[libc++][libc++abi] Fix or suppress failing tests in single-threaded
authorEric Fiselier <eric@efcs.ca>
Mon, 20 Jan 2020 02:49:14 +0000 (21:49 -0500)
committerEric Fiselier <eric@efcs.ca>
Mon, 20 Jan 2020 02:49:14 +0000 (21:49 -0500)
builds.

Fix a libc++abi test that was incorrectly checking for threading
primitives even when threading was disabled.

Additionally, temporarily XFAIL some module tests that fail because
the <atomic> header is unsupported but still built as a part of the
std module.

To properly address this libc++ would either need to produce a different
module.modulemap for single-threaded configurations, or it would need
to make the <atomic> header not hard-error and instead be empty
for single-threaded configurations

libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
libcxx/test/libcxx/modules/clocale_exports.sh.cpp
libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
libcxxabi/test/guard_test_basic.pass.cpp

index a24aafd..70477d9 100644 (file)
 // are not modular
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
 // REQUIRES: modules-support
 
 // Test that <cinttypes> re-exports <cstdint>
index 3225155..6c4bc26 100644 (file)
 // are not modular
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
 // REQUIRES: modules-support
 // UNSUPPORTED: c++98, c++03
 
index 315d9ac..c473245 100644 (file)
 // are not modular
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
 // REQUIRES: modules-support
 
 // Test that <cstdint> re-exports <stdint.h>
index 4cbb1d5..a653b05 100644 (file)
 // are not modular
 // XFAIL: LIBCXX-WINDOWS-FIXME
 
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
 // REQUIRES: modules-support
 
 // Test that intypes.h re-exports stdint.h
index 5b35ba3..ec86ad8 100644 (file)
@@ -6,6 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+// FIXME: The <atomic> header is not supported for single-threaded systems,
+// but still gets built as part of the 'std' module, which breaks the build.
+// XFAIL: libcpp-has-no-threads
+
 // REQUIRES: modules-support
 
 // Test that int8_t and the like are exported from stdint.h not inttypes.h
index 7e5b7ac..1c756f4 100644 (file)
@@ -127,7 +127,7 @@ int main() {
 #endif
   }
   {
-#if defined(__APPLE__) || defined(__linux__)
+#if (defined(__APPLE__) || defined(__linux__))  && !defined(_LIBCXXABI_HAS_NO_THREADS)
     assert(PlatformThreadID);
 #endif
     if (PlatformSupportsThreadID()) {