Skip to content

Commit

Permalink
[libc++][libc++abi] Fix or suppress failing tests in single-threaded
Browse files Browse the repository at this point in the history
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
  • Loading branch information
EricWF committed Jan 20, 2020
1 parent 7a9fa76 commit d15fad2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libcxx/test/libcxx/modules/cinttypes_exports.sh.cpp
Expand Up @@ -10,6 +10,10 @@
// 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>
Expand Down
4 changes: 4 additions & 0 deletions libcxx/test/libcxx/modules/clocale_exports.sh.cpp
Expand Up @@ -10,6 +10,10 @@
// 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

Expand Down
4 changes: 4 additions & 0 deletions libcxx/test/libcxx/modules/cstdint_exports.sh.cpp
Expand Up @@ -10,6 +10,10 @@
// 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>
Expand Down
4 changes: 4 additions & 0 deletions libcxx/test/libcxx/modules/inttypes_h_exports.sh.cpp
Expand Up @@ -10,6 +10,10 @@
// 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
Expand Down
4 changes: 4 additions & 0 deletions libcxx/test/libcxx/modules/stdint_h_exports.sh.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libcxxabi/test/guard_test_basic.pass.cpp
Expand Up @@ -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()) {
Expand Down

0 comments on commit d15fad2

Please sign in to comment.