Skip to content

[libc++] Add coverage for C++17 and Clang Modules with LSV #131815

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

Merged
merged 2 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions libcxx/cmake/caches/Generic-modules-cxx17-lsv.cmake
Original file line number Diff line number Diff line change
@@ -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 "")
2 changes: 0 additions & 2 deletions libcxx/cmake/caches/Generic-modules-lsv.cmake

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// UNSUPPORTED: no-threads
// REQUIRES: c++03 || c++11 || c++14 || c++17 || c++20

// No diagnostic gets emitted when we build with modules.
// XFAIL: clang-modules-build

// This test ensures that we issue a reasonable diagnostic when including <atomic> after
// <stdatomic.h> has been included. Before C++23, this otherwise leads to obscure errors
// because <atomic> may try to redefine things defined by <stdatomic.h>.
Expand Down
4 changes: 2 additions & 2 deletions libcxx/utils/ci/run-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
3 changes: 2 additions & 1 deletion libcxx/utils/libcxx/test/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down