diff --git a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp --- a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + // #include diff --git a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp @@ -20,13 +20,16 @@ #include #include #include -#include #include #include #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +# include +#endif + #include "compare_types.h" namespace fundamentals { diff --git a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp @@ -20,13 +20,16 @@ #include #include #include -#include #include #include #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +# include +#endif + #include "compare_types.h" template diff --git a/libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp b/libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp @@ -19,13 +19,16 @@ #include #include #include -#include #include #include #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +# include +#endif + #include "../support/allocators.h" // Note: is_lvalue_reference is checked in all ModelsAssignableFrom calls. diff --git a/libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp --- a/libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp +++ b/libcxx/test/std/concepts/concepts.object/movable.compile.pass.cpp @@ -18,11 +18,14 @@ #include #include #include -#include #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +# include +#endif + #include "type_classification/moveconstructible.h" #include "type_classification/movable.h" diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp --- a/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp @@ -11,6 +11,8 @@ // // clang-format off +// UNSUPPORTED: libcpp-has-no-threads + // // Test the feature test macros defined by diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// + // UNSUPPORTED: libcpp-has-no-threads // diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// + // UNSUPPORTED: libcpp-has-no-threads // diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.compile.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.compile.fail.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.compile.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/assign.compile.fail.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + // // struct once_flag; diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.compile.fail.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.compile.fail.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.compile.fail.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/copy.compile.fail.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + // // struct once_flag; diff --git a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp --- a/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp +++ b/libcxx/test/std/thread/thread.mutex/thread.once/thread.once.onceflag/default.pass.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcpp-has-no-threads + // // struct once_flag; diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -653,23 +653,26 @@ # Map from each header to the Lit annotations that should be used for # tests that include that header. # -# For example, when threads are not supported, any feature-test-macro test -# that includes should be marked as UNSUPPORTED, because including -# is a hard error in that case. +# For example, when threads are not supported, any test that includes +# should be marked as UNSUPPORTED, because including +# is a hard error in that case. lit_markup = { "barrier": ["UNSUPPORTED: libcpp-has-no-threads"], "filesystem": ["UNSUPPORTED: libcpp-has-no-filesystem-library"], "format": ["UNSUPPORTED: libcpp-has-no-incomplete-format"], "iomanip": ["UNSUPPORTED: libcpp-has-no-localization"], + "ios": ["UNSUPPORTED: libcpp-has-no-localization"], + "iostream": ["UNSUPPORTED: libcpp-has-no-localization"], "istream": ["UNSUPPORTED: libcpp-has-no-localization"], "latch": ["UNSUPPORTED: libcpp-has-no-threads"], "locale": ["UNSUPPORTED: libcpp-has-no-localization"], + "mutex": ["UNSUPPORTED: libcpp-has-no-threads"], "ostream": ["UNSUPPORTED: libcpp-has-no-localization"], "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"], "regex": ["UNSUPPORTED: libcpp-has-no-localization"], "semaphore": ["UNSUPPORTED: libcpp-has-no-threads"], "shared_mutex": ["UNSUPPORTED: libcpp-has-no-threads"], - "thread": ["UNSUPPORTED: libcpp-has-no-threads"], + "thread": ["UNSUPPORTED: libcpp-has-no-threads"] } def get_std_dialects(): diff --git a/libcxx/utils/generate_header_inclusion_tests.py b/libcxx/utils/generate_header_inclusion_tests.py --- a/libcxx/utils/generate_header_inclusion_tests.py +++ b/libcxx/utils/generate_header_inclusion_tests.py @@ -86,9 +86,9 @@ # Map from each header to the Lit annotations that should be used for # tests that include that header. # -# For example, when threads are not supported, any test -# that includes should be marked as UNSUPPORTED, because including -# is a hard error in that case. +# For example, when threads are not supported, any test that includes +# should be marked as UNSUPPORTED, because including +# is a hard error in that case. lit_markup = { "barrier": ["UNSUPPORTED: libcpp-has-no-threads"], "filesystem": ["UNSUPPORTED: libcpp-has-no-filesystem-library"], @@ -99,12 +99,13 @@ "istream": ["UNSUPPORTED: libcpp-has-no-localization"], "latch": ["UNSUPPORTED: libcpp-has-no-threads"], "locale": ["UNSUPPORTED: libcpp-has-no-localization"], + "mutex": ["UNSUPPORTED: libcpp-has-no-threads"], "ostream": ["UNSUPPORTED: libcpp-has-no-localization"], "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"], "regex": ["UNSUPPORTED: libcpp-has-no-localization"], "semaphore": ["UNSUPPORTED: libcpp-has-no-threads"], "shared_mutex": ["UNSUPPORTED: libcpp-has-no-threads"], - "thread": ["UNSUPPORTED: libcpp-has-no-threads"], + "thread": ["UNSUPPORTED: libcpp-has-no-threads"] }