diff --git a/libcxx/test/libcxx/modules/cinttypes_exports.compile.pass.cpp b/libcxx/test/libcxx/modules/cinttypes_exports.compile.pass.cpp deleted file mode 100644 index aa3ae7f97a21e6..00000000000000 --- a/libcxx/test/libcxx/modules/cinttypes_exports.compile.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 re-exports - -#include - -int main(int, char**) { - int8_t x; (void)x; - std::int8_t y; (void)y; - - return 0; -} diff --git a/libcxx/test/libcxx/modules/clocale_exports.compile.pass.cpp b/libcxx/test/libcxx/modules/clocale_exports.compile.pass.cpp deleted file mode 100644 index 92c50e24a0cbe5..00000000000000 --- a/libcxx/test/libcxx/modules/clocale_exports.compile.pass.cpp +++ /dev/null @@ -1,32 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 - -int main(int, char**) { - std::lconv l; (void)l; - using T = decltype(std::setlocale(0, "")); - using U = decltype(std::localeconv()); - - return 0; -} diff --git a/libcxx/test/libcxx/modules/cstdint_exports.compile.pass.cpp b/libcxx/test/libcxx/modules/cstdint_exports.compile.pass.cpp deleted file mode 100644 index b83e4da3747174..00000000000000 --- a/libcxx/test/libcxx/modules/cstdint_exports.compile.pass.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 re-exports - -// REQUIRES: modules-support -// ADDITIONAL_COMPILE_FLAGS: -fmodules - -#include - -int main(int, char**) { - int8_t x; (void)x; - std::int8_t y; (void)y; - - return 0; -} diff --git a/libcxx/test/libcxx/modules/inttypes_h_exports.compile.pass.cpp b/libcxx/test/libcxx/modules/inttypes_h_exports.compile.pass.cpp deleted file mode 100644 index ffc6a6296b180f..00000000000000 --- a/libcxx/test/libcxx/modules/inttypes_h_exports.compile.pass.cpp +++ /dev/null @@ -1,30 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 - -int main(int, char**) { - int8_t x; (void)x; - - return 0; -} diff --git a/libcxx/test/libcxx/modules/stdint_h_exports.compile.pass.cpp b/libcxx/test/libcxx/modules/stdint_h_exports.compile.pass.cpp deleted file mode 100644 index ad59b3ce82cd72..00000000000000 --- a/libcxx/test/libcxx/modules/stdint_h_exports.compile.pass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 - -int main(int, char**) { - int8_t x; (void)x; - - return 0; -} diff --git a/libcxx/test/libcxx/modules/stds_include.sh.cpp b/libcxx/test/libcxx/modules/stds_include.sh.cpp deleted file mode 100644 index 715ab44d5b278b..00000000000000 --- a/libcxx/test/libcxx/modules/stds_include.sh.cpp +++ /dev/null @@ -1,39 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 - -int main(int, char**) { - return 0; -} diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py index 85955cd4c3b6a4..43c9e4abf1cd38 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -43,15 +43,6 @@ 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