Skip to content

Commit ae89648

Browse files
committed
Addess review comments.
1 parent 2ddc56b commit ae89648

14 files changed

+27
-26
lines changed

libcxx/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ set(LIBCXX_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
177177
"Define suffix of library directory name (32/64)")
178178
option(LIBCXX_INSTALL_HEADERS "Install the libc++ headers." ON)
179179
option(LIBCXX_INSTALL_LIBRARY "Install the libc++ library." ON)
180-
cmake_dependent_option(LIBCXX_INSTALL_MODULES
181-
"Install the libc++ C++20 modules (experimental)." OFF
180+
cmake_dependent_option(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES
181+
"Install the libc++ C++20 module interface unit source files (experimental)." OFF
182182
"LIBCXX_ENABLE_STD_MODULES" OFF
183183
)
184184
cmake_dependent_option(LIBCXX_INSTALL_STATIC_LIBRARY
@@ -428,8 +428,8 @@ set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE STRING
428428
"Path where target-agnostic libc++ headers should be installed.")
429429
set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
430430
"Path where built libc++ runtime libraries should be installed.")
431-
set(LIBCXX_INSTALL_MODULE_DIR "usr/share/libc++/v1" CACHE STRING
432-
"Path where target-agnostic libc++ modules should be installed.")
431+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR "share/libc++/v1" CACHE STRING
432+
"Path where target-agnostic libc++ module interface unit source should be installed.")
433433

434434
set(LIBCXX_SHARED_OUTPUT_NAME "c++" CACHE STRING "Output name for the shared libc++ runtime library.")
435435
set(LIBCXX_STATIC_OUTPUT_NAME "c++" CACHE STRING "Output name for the static libc++ runtime library.")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_TEST_PARAMS "std=c++26" CACHE STRING "")
44
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_HARDENING_MODE "extensive" CACHE STRING "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
44
set(LIBCXXABI_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_TEST_PARAMS "enable_experimental=False" CACHE STRING "")
44
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
44
set(LIBCXXABI_ENABLE_THREADS OFF CACHE BOOL "")
55
set(LIBCXX_ENABLE_MONOTONIC_CLOCK OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(LIBCXX_ENABLE_STD_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2-
set(LIBCXX_INSTALL_MODULES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
2+
set(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES ON CACHE BOOL "") # TODO MODULES Remove when enabled automatically.
33
set(LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "")

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ Improvements and New Features
8181
- The ``_LIBCPP_ENABLE_CXX26_REMOVED_STRING_RESERVE`` macro has been added to make
8282
the function ``std::basic_string<...>::reserve()`` available.
8383

84-
- The experimental standard library modules can now be installed. By default,
85-
they are not installed. This can be enabled by configuring CMake with
86-
``-DLIBCXX_INSTALL_MODULES=ON``. The installation directory can be configured
87-
with the CMake option ``-DLIBCXX_INSTALL_MODULE_DIR=<path>``. The default
88-
location is ``modules/c++/v1`` in the same prefix as the ``include``
84+
- The experimental standard library module module interface unit source files
85+
can now be installed. By default, they are not installed. This can be enabled
86+
by configuring CMake with
87+
``-DLIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES=ON``. The installation
88+
directory can be configured with the CMake option
89+
``-DLIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR=<path>``. The default
90+
location is ``share/libc++/v1`` in the same prefix as the ``include``
8991
directory.
9092

9193

libcxx/modules/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,10 @@ add_custom_target(generate-cxx-modules
212212
)
213213

214214
# Use the relative path between the installation and the module in the json
215-
# file. This allows moving the entire installation to a different to a
216-
# different location.
215+
# file. This allows moving the entire installation to a different location.
217216
file(RELATIVE_PATH LIBCXX_MODULE_RELATIVE_PATH
218217
${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_LIBRARY_DIR}
219-
${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_MODULE_DIR})
218+
${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR})
220219
configure_file(
221220
"modules.json.in"
222221
"${LIBCXX_LIBRARY_DIR}/libc++.modules.json"
@@ -227,11 +226,11 @@ configure_file(
227226
add_library(cxx-modules INTERFACE)
228227
add_dependencies(cxx-modules generate-cxx-modules)
229228

230-
if (LIBCXX_INSTALL_MODULES)
229+
if (LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES)
231230
foreach(file ${LIBCXX_MODULE_STD_SOURCES} ${LIBCXX_MODULE_STD_COMPAT_SOURCES})
232231
get_filename_component(dir ${file} DIRECTORY)
233232
install(FILES ${file}
234-
DESTINATION "${LIBCXX_INSTALL_MODULE_DIR}/${dir}"
233+
DESTINATION "${LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR}/${dir}"
235234
COMPONENT cxx-modules
236235
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
237236
)
@@ -241,7 +240,7 @@ if (LIBCXX_INSTALL_MODULES)
241240
install(FILES
242241
"${LIBCXX_GENERATED_MODULE_DIR}/std.cppm"
243242
"${LIBCXX_GENERATED_MODULE_DIR}/std.compat.cppm"
244-
DESTINATION "${LIBCXX_INSTALL_MODULE_DIR}"
243+
DESTINATION "${LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCE_DIR}"
245244
COMPONENT cxx-modules
246245
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
247246
)

libcxx/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ if (NOT CMAKE_CONFIGURATION_TYPES)
397397
if(LIBCXX_INSTALL_HEADERS)
398398
set(header_install_target install-cxx-headers)
399399
endif()
400-
if(LIBCXX_INSTALL_MODULES)
400+
if(LIBCXX_INSTALL_MODULE_INTERFACE_UNIT_SOURCES)
401401
set(header_install_target install-cxx-modules)
402402
endif()
403403
add_custom_target(install-cxx

0 commit comments

Comments
 (0)