Skip to content

Commit d15fad2

Browse files
committed
[libc++][libc++abi] Fix or suppress failing tests in single-threaded
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
1 parent 7a9fa76 commit d15fad2

File tree

6 files changed

+21
-1
lines changed

6 files changed

+21
-1
lines changed

libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// are not modular
1111
// XFAIL: LIBCXX-WINDOWS-FIXME
1212

13+
// FIXME: The <atomic> header is not supported for single-threaded systems,
14+
// but still gets built as part of the 'std' module, which breaks the build.
15+
// XFAIL: libcpp-has-no-threads
16+
1317
// REQUIRES: modules-support
1418

1519
// Test that <cinttypes> re-exports <cstdint>

libcxx/test/libcxx/modules/clocale_exports.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// are not modular
1111
// XFAIL: LIBCXX-WINDOWS-FIXME
1212

13+
// FIXME: The <atomic> header is not supported for single-threaded systems,
14+
// but still gets built as part of the 'std' module, which breaks the build.
15+
// XFAIL: libcpp-has-no-threads
16+
1317
// REQUIRES: modules-support
1418
// UNSUPPORTED: c++98, c++03
1519

libcxx/test/libcxx/modules/cstdint_exports.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// are not modular
1111
// XFAIL: LIBCXX-WINDOWS-FIXME
1212

13+
// FIXME: The <atomic> header is not supported for single-threaded systems,
14+
// but still gets built as part of the 'std' module, which breaks the build.
15+
// XFAIL: libcpp-has-no-threads
16+
1317
// REQUIRES: modules-support
1418

1519
// Test that <cstdint> re-exports <stdint.h>

libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
// are not modular
1111
// XFAIL: LIBCXX-WINDOWS-FIXME
1212

13+
// FIXME: The <atomic> header is not supported for single-threaded systems,
14+
// but still gets built as part of the 'std' module, which breaks the build.
15+
// XFAIL: libcpp-has-no-threads
16+
1317
// REQUIRES: modules-support
1418

1519
// Test that intypes.h re-exports stdint.h

libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// FIXME: The <atomic> header is not supported for single-threaded systems,
10+
// but still gets built as part of the 'std' module, which breaks the build.
11+
// XFAIL: libcpp-has-no-threads
12+
913
// REQUIRES: modules-support
1014

1115
// Test that int8_t and the like are exported from stdint.h not inttypes.h

libcxxabi/test/guard_test_basic.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int main() {
127127
#endif
128128
}
129129
{
130-
#if defined(__APPLE__) || defined(__linux__)
130+
#if (defined(__APPLE__) || defined(__linux__)) && !defined(_LIBCXXABI_HAS_NO_THREADS)
131131
assert(PlatformThreadID);
132132
#endif
133133
if (PlatformSupportsThreadID()) {

0 commit comments

Comments
 (0)