-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++] Add coverage for C++17 and Clang Modules with LSV #131815
[libc++] Add coverage for C++17 and Clang Modules with LSV #131815
Conversation
In recent versions of Clang, using -std=c++20 (and later) implies LSV when compiling with modules. This change resulted in making our LSV job redundant with the regular modules job, which uses the latest Standard. This patch increases the coverage of our CI without increasing its cost by pinning the LSV job to use C++17, which normally doesn't use LSV. A related question is whether we should add coverage for non-LSV builds using Clang modules.
@llvm/pr-subscribers-github-workflow @llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesIn recent versions of Clang, using -std=c++20 (and later) implies LSV when compiling with modules. This change resulted in making our LSV job redundant with the regular modules job, which uses the latest Standard. This patch increases the coverage of our CI without increasing its cost by pinning the LSV job to use C++17, which normally doesn't use LSV. A related question is whether we should add coverage for non-LSV builds using Clang modules. Full diff: https://github.com/llvm/llvm-project/pull/131815.diff 5 Files Affected:
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 8c011425abfcf..0f4c6f53d6e8d 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -137,7 +137,7 @@ jobs:
'generic-hardening-mode-fast',
'generic-hardening-mode-fast-with-abi-breaks',
'generic-merged',
- 'generic-modules-lsv',
+ 'generic-modules-cxx17-lsv',
'generic-no-exceptions',
'generic-no-experimental',
'generic-no-filesystem',
diff --git a/libcxx/cmake/caches/Generic-modules-cxx17-lsv.cmake b/libcxx/cmake/caches/Generic-modules-cxx17-lsv.cmake
new file mode 100644
index 0000000000000..c73e2a142092b
--- /dev/null
+++ b/libcxx/cmake/caches/Generic-modules-cxx17-lsv.cmake
@@ -0,0 +1,2 @@
+set(LIBCXX_TEST_PARAMS "enable_modules=clang-lsv;std=c++17" CACHE STRING "")
+set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
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..29eebd1f92189 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -454,9 +454,9 @@ generic-modules)
check-runtimes
check-abi-list
;;
-generic-modules-lsv)
+generic-modules-cxx17-lsv)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules-lsv.cmake"
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules-cxx17-lsv.cmake"
check-runtimes
check-abi-list
;;
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 93dc3a8be3f08..58ace0ba96e35 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -210,7 +210,8 @@ def getSuitableClangTidy(cfg):
choices=["none", "clang", "clang-lsv"],
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.",
+ "Select `clang` for Clang modules, and 'clang-lsv' for Clang modules with Local Submodule Visibility. "
+ "Note that in recent versions of Clang, using Clang modules with -std=c++20 and later implies LSV.",
default="none",
actions=lambda modules: filter(None, [
AddFeature("clang-modules-build") if modules in ("clang", "clang-lsv") else None,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM!
In recent versions of Clang, using -std=c++20 (and later) implies LSV when compiling with modules. This change resulted in making our LSV job redundant with the regular modules job, which uses the latest Standard. This patch increases the coverage of our CI without increasing its cost by pinning the LSV job to use C++17, which normally doesn't use LSV. A related question is whether we should add coverage for non-LSV builds using Clang modules.