Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libunwind] Convert a few options from CACHE PATH to CACHE STRING #77534

Merged
merged 1 commit into from Jan 10, 2024

Conversation

mstorsjo
Copy link
Member

@mstorsjo mstorsjo commented Jan 9, 2024

This applies the same change as in
760261a (where they were applied to libcxxabi and libcxx) to libunwind as well.

These options can reasonably be set either as an absolute or relative path, but if set as type PATH, they are rewritten from relative into absolute relative to the build directory, while the relative form is intended to be relative to the install prefix.

This applies the same change as in
760261a (where they were applied
to libcxxabi and libcxx) to libunwind as well.

These options can reasonably be set either as an absolute or
relative path, but if set as type PATH, they are rewritten from
relative into absolute relative to the build directory, while
the relative form is intended to be relative to the install prefix.
@mstorsjo mstorsjo added cmake Build system in general and CMake in particular libunwind labels Jan 9, 2024
@mstorsjo mstorsjo requested a review from a team as a code owner January 9, 2024 22:34
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 9, 2024

@llvm/pr-subscribers-libunwind

Author: Martin Storsjö (mstorsjo)

Changes

This applies the same change as in
760261a (where they were applied to libcxxabi and libcxx) to libunwind as well.

These options can reasonably be set either as an absolute or relative path, but if set as type PATH, they are rewritten from relative into absolute relative to the build directory, while the relative form is intended to be relative to the install prefix.


Full diff: https://github.com/llvm/llvm-project/pull/77534.diff

1 Files Affected:

  • (modified) libunwind/CMakeLists.txt (+4-4)
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 248e888619e40b..bb1b052f61d875 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -105,9 +105,9 @@ set(CMAKE_MODULE_PATH
     "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
     ${CMAKE_MODULE_PATH})
 
-set(LIBUNWIND_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH
+set(LIBUNWIND_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING
     "Path where built libunwind headers should be installed.")
-set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
+set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
     "Path where built libunwind runtime libraries should be installed.")
 
 set(LIBUNWIND_SHARED_OUTPUT_NAME "unwind" CACHE STRING "Output name for the shared libunwind runtime library.")
@@ -115,7 +115,7 @@ set(LIBUNWIND_STATIC_OUTPUT_NAME "unwind" CACHE STRING "Output name for the stat
 
 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
   set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
       "Path where built libunwind libraries should be installed.")
   if(LIBCXX_LIBDIR_SUBDIR)
     string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
@@ -127,7 +127,7 @@ else()
   else()
     set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
   endif()
-  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+  set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE STRING
       "Path where built libunwind libraries should be installed.")
 endif()
 

@mstorsjo mstorsjo merged commit be320fd into llvm:main Jan 10, 2024
11 of 12 checks passed
@mstorsjo mstorsjo deleted the libunwind-cache-path branch January 10, 2024 09:25
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
…vm#77534)

This applies the same change as in
760261a (where they were applied to
libcxxabi and libcxx) to libunwind as well.

These options can reasonably be set either as an absolute or relative
path, but if set as type PATH, they are rewritten from relative into
absolute relative to the build directory, while the relative form is
intended to be relative to the install prefix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular libunwind
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants