Skip to content

Commit e020e08

Browse files
committed
[RFC][libc++] Install modules.
The patch is based on the discussion in SG-15 on 12.12.2023. Fixes: #73089
1 parent b689e16 commit e020e08

16 files changed

+105
-1
lines changed

libcxx/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ set(LIBCXX_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
178178
"Define suffix of library directory name (32/64)")
179179
option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." ON)
180180
option(LIBCXX_INSTALL_LIBRARY "Install the libc++ library." ON)
181+
cmake_dependent_option(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES
182+
"Install the libc++ C++20 module interface unit source files (experimental)." OFF
183+
"LIBCXX_ENABLE_STD_MODULES" OFF
184+
)
181185
cmake_dependent_option(LIBCXX_INSTALL_STATIC_LIBRARY
182186
"Install the static libc++ library." ON
183187
"LIBCXX_ENABLE_STATIC;LIBCXX_INSTALL_LIBRARY" OFF)
@@ -425,6 +429,8 @@ set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE STRING
425429
"Path where target-agnostic libc++ headers should be installed.")
426430
set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
427431
"Path where built libc++ runtime libraries should be installed.")
432+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR "share/libc++/v1" CACHE STRING
433+
"Path where target-agnostic libc++ module interface unit source should be installed.")
428434

429435
set(LIBCXX_SHARED_OUTPUT_NAME "c++" CACHE STRING "Output name for the shared libc++ runtime library.")
430436
set(LIBCXX_STATIC_OUTPUT_NAME "c++" CACHE STRING "Output name for the static libc++ runtime library.")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
set(LIBCXX_INSTALL_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_INSTALL_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_INSTALL_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_INSTALL_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_INSTALL_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_INSTALL_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_INSTALL_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_INSTALL_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 "")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
12
set(LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")

0 commit comments

Comments
 (0)