Skip to content

Commit 4079370

Browse files
committed
Revert "[libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (llvm#85756)"
This reverts commit 272d1b4, and the follow-up fix in d209d13. Even after the follow-up fix, building with an empty CMAKE_INSTALL_PREFIX errors out with errors like this: CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/libcxx/modules/CMakeLists.txt:215 (file): file RELATIVE_PATH must be passed a full path to the directory: lib/x86_64-pc-windows-msvc
1 parent 75dfa58 commit 4079370

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

libcxx/modules/CMakeLists.txt

+2-8
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,9 @@ add_custom_target(generate-cxx-modules
206206
# Configure the modules manifest.
207207
# Use the relative path between the installation and the module in the json
208208
# file. This allows moving the entire installation to a different location.
209-
cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_LIBRARY_DIR
210-
BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
211-
OUTPUT_VARIABLE ABS_LIBRARY_DIR)
212-
cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_MODULES_DIR
213-
BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
214-
OUTPUT_VARIABLE ABS_MODULES_DIR)
215209
file(RELATIVE_PATH LIBCXX_MODULE_RELATIVE_PATH
216-
${ABS_LIBRARY_DIR}
217-
${ABS_MODULES_DIR})
210+
${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_LIBRARY_DIR}
211+
${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_MODULES_DIR})
218212
configure_file(
219213
"modules.json.in"
220214
"${LIBCXX_LIBRARY_DIR}/libc++.modules.json"

0 commit comments

Comments
 (0)