Skip to content

Commit

Permalink
[compiler-rt][cmake] Use GNUInstallDirs to support custom installat…
Browse files Browse the repository at this point in the history
…ion dirs

I am breaking apart D99484 so the cause of build failures is easier to
understand.

Differential Revision: https://reviews.llvm.org/D117420
  • Loading branch information
Ericson2314 committed Jan 17, 2022
1 parent 5a45778 commit 09949c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compiler-rt/cmake/base-config-ix.cmake
Expand Up @@ -5,6 +5,7 @@

include(CheckIncludeFile)
include(CheckCXXSourceCompiles)
include(GNUInstallDirs)
include(ExtendPath)

check_include_file(unwind.h HAVE_UNWIND_H)
Expand Down Expand Up @@ -108,13 +109,13 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt libraries should be installed.")
endif()
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" bin)
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_BINDIR}")
set(COMPILER_RT_INSTALL_BINARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt executables should be installed.")
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" include)
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_INCLUDEDIR}")
set(COMPILER_RT_INSTALL_INCLUDE_DIR "${default_install_path}" CACHE PATH
"Path where compiler-rt headers should be installed.")
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" share)
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_DATADIR}")
set(COMPILER_RT_INSTALL_DATA_DIR "${default_install_path}" CACHE PATH
"Path where compiler-rt data files should be installed.")

Expand Down

0 comments on commit 09949c4

Please sign in to comment.