+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test fails on Windows because the underlying libc headers on Windows
-// are not modular
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// REQUIRES: modules-support
-// ADDITIONAL_COMPILE_FLAGS: -fmodules
-
-// Test that <cinttypes> re-exports <cstdint>
-
-#include <cinttypes>
-
-int main(int, char**) {
- int8_t x; (void)x;
- std::int8_t y; (void)y;
-
- return 0;
-}
+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test fails on Windows because the underlying libc headers on Windows
-// are not modular
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// UNSUPPORTED: c++03
-
-// REQUIRES: modules-support
-// ADDITIONAL_COMPILE_FLAGS: -fmodules
-
-#include <clocale>
-
-int main(int, char**) {
- std::lconv l; (void)l;
- using T = decltype(std::setlocale(0, ""));
- using U = decltype(std::localeconv());
-
- return 0;
-}
+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test fails on Windows because the underlying libc headers on Windows
-// are not modular
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// Test that <cstdint> re-exports <stdint.h>
-
-// REQUIRES: modules-support
-// ADDITIONAL_COMPILE_FLAGS: -fmodules
-
-#include <cstdint>
-
-int main(int, char**) {
- int8_t x; (void)x;
- std::int8_t y; (void)y;
-
- return 0;
-}
+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// This test fails on Windows because the underlying libc headers on Windows
-// are not modular
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// Test that intypes.h re-exports stdint.h
-
-// REQUIRES: modules-support
-// ADDITIONAL_COMPILE_FLAGS: -fmodules
-
-#include <inttypes.h>
-
-int main(int, char**) {
- int8_t x; (void)x;
-
- return 0;
-}
+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// Test that int8_t and the like are exported from stdint.h, not inttypes.h
-
-// REQUIRES: modules-support
-// ADDITIONAL_COMPILE_FLAGS: -fmodules
-
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-#include <stdint.h>
-
-int main(int, char**) {
- int8_t x; (void)x;
-
- return 0;
-}
+++ /dev/null
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Test that we can include libc++ headers when building with modules
-// enabled in various Standard modes. This is a common source of breakage
-// since the 'std' module will include all headers, so if something in a
-// header fails under a standard mode, importing anything will fail.
-
-// This test fails on Windows because the underlying libc headers on Windows
-// are not modular
-// XFAIL: LIBCXX-WINDOWS-FIXME
-
-// Some headers are not available when these features are disabled, but they
-// still get built as part of the 'std' module, which breaks the build.
-// UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: libcpp-has-no-localization
-// UNSUPPORTED: libcpp-has-no-filesystem-library
-
-// REQUIRES: modules-support
-
-// NOTE: The -std=XXX flag is present in %{flags}, so we overwrite it by passing it after %{flags}.
-// FIXME: Remove the `-DINVALIDATE_CACHE_FOO` macros. Their purpose is to workaround a bug in older Clang versions
-// the same modules caches were reused across standard dialects.
-// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++03 -DINVALIDATE_CACHE_CXX03 %s
-// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++11 -DINVALIDATE_CACHE_CXX11 %s
-// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++14 -DINVALIDATE_CACHE_CXX14 %s
-// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++17 -DINVALIDATE_CACHE_CXX17 %s
-// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++2a -DINVALIDATE_CACHE_CXX20 %s
-
-#include <vector>
-
-int main(int, char**) {
- return 0;
-}
sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
Feature(name='objective-c++', when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
- # Note: We use a custom modules cache path to make sure that we don't reuse
- # the default one, which can be shared across builds. This is important
- # because we define macros in headers files, and a change in these macros
- # doesn't seem to invalidate modules cache entries, which means we could
- # build against now-invalid cached headers from a previous build.
- Feature(name='modules-support',
- when=lambda cfg: hasCompileFlag(cfg, '-fmodules'),
- actions=lambda cfg: [AddCompileFlag('-fmodules-cache-path=%t/ModuleCache')]),
-
Feature(name='non-lockfree-atomics',
when=lambda cfg: sourceBuilds(cfg, """
#include <atomic>