[libcxx-commits] [libcxx] 4079370 - Revert "[libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (#85756)"
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 20 09:07:45 PDT 2024
Author: Martin Storsjö
Date: 2024-03-20T18:06:31+02:00
New Revision: 407937036fa7640f61f225474b1ea6623a40dbdd
URL: https://github.com/llvm/llvm-project/commit/407937036fa7640f61f225474b1ea6623a40dbdd
DIFF: https://github.com/llvm/llvm-project/commit/407937036fa7640f61f225474b1ea6623a40dbdd.diff
LOG: Revert "[libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (#85756)"
This reverts commit 272d1b44efdedb68c194970a610f0ca1b7b769c5,
and the follow-up fix in d209d1340b99d4fbd325dffb5e13b757ab8264ea.
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
Added:
Modified:
libcxx/modules/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/modules/CMakeLists.txt b/libcxx/modules/CMakeLists.txt
index 6c917200d6f318..0dea8cfca94ac3 100644
--- a/libcxx/modules/CMakeLists.txt
+++ b/libcxx/modules/CMakeLists.txt
@@ -206,15 +206,9 @@ add_custom_target(generate-cxx-modules
# Configure the modules manifest.
# Use the relative path between the installation and the module in the json
# file. This allows moving the entire installation to a
diff erent location.
-cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_LIBRARY_DIR
- BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
- OUTPUT_VARIABLE ABS_LIBRARY_DIR)
-cmake_path(ABSOLUTE_PATH LIBCXX_INSTALL_MODULES_DIR
- BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
- OUTPUT_VARIABLE ABS_MODULES_DIR)
file(RELATIVE_PATH LIBCXX_MODULE_RELATIVE_PATH
- ${ABS_LIBRARY_DIR}
- ${ABS_MODULES_DIR})
+ ${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_LIBRARY_DIR}
+ ${CMAKE_INSTALL_PREFIX}/${LIBCXX_INSTALL_MODULES_DIR})
configure_file(
"modules.json.in"
"${LIBCXX_LIBRARY_DIR}/libc++.modules.json"
More information about the libcxx-commits
mailing list