summaryrefslogtreecommitdiff
path: root/llvm-libgcc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-01-16 05:52:22 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-07-26 14:48:49 +0000
commit28e665fa054d62d4e2c777774cc83dea533dfe6e (patch)
tree53ecc75e94795d23bafc2956f8f319a6818cba12 /llvm-libgcc
parent0a412b3505f42558573e0d9005d4fe7c6102d8c9 (diff)
downloadllvm-28e665fa054d62d4e2c777774cc83dea533dfe6e.tar.gz
[cmake] Slight fix ups to make robust to the full range of GNUInstallDirs
See https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html#result-variables for `CMAKE_INSTALL_FULL_*` Reviewed By: sebastian-ne Differential Revision: https://reviews.llvm.org/D130545
Diffstat (limited to 'llvm-libgcc')
-rw-r--r--llvm-libgcc/lib/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm-libgcc/lib/CMakeLists.txt b/llvm-libgcc/lib/CMakeLists.txt
index 652af46db4cb..d895a21554b0 100644
--- a/llvm-libgcc/lib/CMakeLists.txt
+++ b/llvm-libgcc/lib/CMakeLists.txt
@@ -1,5 +1,6 @@
include(CheckLibraryExists)
include(GNUInstallDirs)
+include(ExtendPath)
string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
@@ -41,13 +42,13 @@ target_link_libraries(libgcc_s PRIVATE
c
)
-get_filename_component(LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT "${CMAKE_INSTALL_PREFIX}/${LIBUNWIND_INSTALL_LIBRARY_DIR}" ABSOLUTE)
+extend_path(LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT "${CMAKE_INSTALL_PREFIX}" "${LIBUNWIND_INSTALL_LIBRARY_DIR}")
#string(REPLACE "${CMAKE_INSTALL_FULL_LIBDIR}/" "" LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT "${LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT}")
install(TARGETS libgcc_s
LIBRARY DESTINATION "${LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT}" COMPONENT unwind
ARCHIVE DESTINATION "${LLVM_LIBGCC_LIBUNWIND_STATIC_ROOT}" COMPONENT unwind
- RUNTIME DESTINATION bin COMPONENT unwind)
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT unwind)
get_compiler_rt_install_dir(${LLVM_LIBGCC_TARGET_ARCH} install_dir_builtins)
string(REGEX REPLACE "^lib/" "" install_dir_builtins "${install_dir_builtins}")