Skip to content

Commit 5c150e7

Browse files
committed
These cause test build failures on Windows. This reverts the following commits: 57ca748 d06ae33
1 parent 8434e5d commit 5c150e7

36 files changed

+298
-200
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ concurrency:
3535

3636

3737
env:
38+
CMAKE: "/opt/bin/cmake"
3839
# LLVM POST-BRANCH bump version
3940
# LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
4041
# LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
@@ -168,18 +169,24 @@ jobs:
168169
'bootstrapping-build'
169170
]
170171
machine: [ 'libcxx-runners-8-set' ]
172+
std_modules: [ 'OFF' ]
171173
include:
172174
- config: 'generic-cxx26'
173175
machine: libcxx-runners-8-set
176+
std_modules: 'ON'
174177
- config: 'generic-asan'
175178
machine: libcxx-runners-8-set
179+
std_modules: 'OFF'
176180
- config: 'generic-tsan'
177181
machine: libcxx-runners-8-set
182+
std_modules: 'OFF'
178183
- config: 'generic-ubsan'
179184
machine: libcxx-runners-8-set
185+
std_modules: 'OFF'
180186
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
181187
- config: 'generic-msan'
182188
machine: libcxx-runners-8-set
189+
std_modules: 'OFF'
183190
runs-on: ${{ matrix.machine }}
184191
steps:
185192
- uses: actions/checkout@v4
@@ -189,6 +196,7 @@ jobs:
189196
CC: clang-18
190197
CXX: clang++-18
191198
ENABLE_CLANG_TIDY: "OFF"
199+
ENABLE_STD_MODULES: ${{ matrix.std_modules }}
192200
- uses: actions/upload-artifact@v3
193201
if: always()
194202
with:

libcxx/CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
124124
the shared library they shipped should turn this on and see `include/__availability`
125125
for more details." OFF)
126126
option(LIBCXX_ENABLE_CLANG_TIDY "Whether to compile and run clang-tidy checks" OFF)
127+
# TODO MODULES Remove this option and test for the requirements (CMake/Clang) instead.
128+
option(LIBCXX_ENABLE_STD_MODULES
129+
"Whether to enable the building the C++23 `std` module. This feature is
130+
experimental and has additional dependencies. Only enable this when
131+
interested in testing or developing this module. See
132+
https://libcxx.llvm.org/Modules.html for more information." OFF)
127133

128134
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
129135
set(LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in")
@@ -773,6 +779,7 @@ config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
773779
config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
774780
config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE)
775781
config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS)
782+
config_define_if_not(LIBCXX_ENABLE_STD_MODULES _LIBCPP_HAS_NO_STD_MODULES)
776783
config_define_if_not(LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
777784
config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
778785

@@ -856,15 +863,19 @@ endfunction()
856863
add_subdirectory(include)
857864
add_subdirectory(src)
858865
add_subdirectory(utils)
859-
add_subdirectory(modules)
866+
if (LIBCXX_ENABLE_STD_MODULES)
867+
add_subdirectory(modules)
868+
endif()
860869

861870
set(LIBCXX_TEST_DEPS "cxx_experimental")
862871

863872
if (LIBCXX_ENABLE_CLANG_TIDY)
864873
list(APPEND LIBCXX_TEST_DEPS cxx-tidy)
865874
endif()
866875

867-
list(APPEND LIBCXX_TEST_DEPS generate-cxx-modules)
876+
if (LIBCXX_ENABLE_STD_MODULES)
877+
list(APPEND LIBCXX_TEST_DEPS generate-cxx-modules generate-test-module-std)
878+
endif()
868879

869880
if (LIBCXX_INCLUDE_BENCHMARKS)
870881
add_subdirectory(benchmarks)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_TEST_PARAMS "std=c++26" CACHE STRING "")
23
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_HARDENING_MODE "extensive" CACHE STRING "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
23
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_TEST_PARAMS "enable_experimental=False" CACHE STRING "")
23
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
23
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
34
set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")

0 commit comments

Comments
 (0)