From 664b5a6e3938d594dfe7c77920157a6b331d5635 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 17 Mar 2025 16:20:04 -0400 Subject: [PATCH 1/2] [libc++] Remove the explicit Clang/LSV CI job Recent versions of Clang now enable LSV by default when building with modules enabled and C++20 and later. Since our CI job runs with the latest Standard, explicitly specifying LSV is redundant and doesn't add any additional coverage. --- .github/workflows/libcxx-build-and-test.yaml | 1 - libcxx/cmake/caches/Generic-modules-lsv.cmake | 2 -- libcxx/utils/ci/run-buildbot | 6 ------ libcxx/utils/libcxx/test/params.py | 15 +++++++-------- 4 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 libcxx/cmake/caches/Generic-modules-lsv.cmake diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 8c011425abfcf..6b4e791369d50 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -137,7 +137,6 @@ jobs: 'generic-hardening-mode-fast', 'generic-hardening-mode-fast-with-abi-breaks', 'generic-merged', - 'generic-modules-lsv', 'generic-no-exceptions', 'generic-no-experimental', 'generic-no-filesystem', diff --git a/libcxx/cmake/caches/Generic-modules-lsv.cmake b/libcxx/cmake/caches/Generic-modules-lsv.cmake deleted file mode 100644 index 395fccc217650..0000000000000 --- a/libcxx/cmake/caches/Generic-modules-lsv.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(LIBCXX_TEST_PARAMS "enable_modules=clang-lsv" CACHE STRING "") -set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "") diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index 947932f3802a1..6fc6c8b658ede 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -454,12 +454,6 @@ generic-modules) check-runtimes check-abi-list ;; -generic-modules-lsv) - clean - generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules-lsv.cmake" - check-runtimes - check-abi-list -;; # # Parts removed # diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 93dc3a8be3f08..ace4630472b6b 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -207,24 +207,23 @@ def getSuitableClangTidy(cfg): ), Parameter( name="enable_modules", - choices=["none", "clang", "clang-lsv"], + choices=["none", "clang"], type=str, - help="Whether to build the test suite with modules enabled. " - "Select `clang` for Clang modules, and 'clang-lsv' for Clang modules with Local Submodule Visibility.", + help="Whether to build the test suite with Clang modules enabled. Select `clang` for Clang modules, and " + "'none' for a non-modular build. Note that recent versions of Clang enable Local Submodule Visibility " + "by default in C++20 and later.", default="none", actions=lambda modules: filter(None, [ - AddFeature("clang-modules-build") if modules in ("clang", "clang-lsv") else None, + AddFeature("clang-modules-build") if modules == "clang" else None, # Note: AppleClang disregards -fmodules entirely when compiling C++, so we also pass -fcxx-modules # to enable modules for C++. - AddCompileFlag("-fmodules -fcxx-modules") if modules in ("clang", "clang-lsv") else None, + AddCompileFlag("-fmodules -fcxx-modules") if modules == "clang") else None, # Note: We use a custom modules cache path to make sure that we don't reuse # the default one, which can be shared across CI builds with different # configurations. - AddCompileFlag(lambda cfg: f"-fmodules-cache-path={cfg.test_exec_root}/ModuleCache") if modules in ("clang", "clang-lsv") else None, - - AddCompileFlag("-Xclang -fmodules-local-submodule-visibility") if modules == "clang-lsv" else None, + AddCompileFlag(lambda cfg: f"-fmodules-cache-path={cfg.test_exec_root}/ModuleCache") if modules == "clang" else None, ]) ), Parameter( From 599bfbb3c24757d1547fc6b26982da0cb60f645a Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 17 Mar 2025 22:45:49 -0400 Subject: [PATCH 2/2] Fix broken paren --- libcxx/utils/libcxx/test/params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index ace4630472b6b..59479fbc7c593 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -218,7 +218,7 @@ def getSuitableClangTidy(cfg): # Note: AppleClang disregards -fmodules entirely when compiling C++, so we also pass -fcxx-modules # to enable modules for C++. - AddCompileFlag("-fmodules -fcxx-modules") if modules == "clang") else None, + AddCompileFlag("-fmodules -fcxx-modules") if modules == "clang" else None, # Note: We use a custom modules cache path to make sure that we don't reuse # the default one, which can be shared across CI builds with different