summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-01-10 22:59:00 +0000
committerPetr Hosek <phosek@chromium.org>2018-01-10 22:59:00 +0000
commit5e9e86a538a185e130f33f46550b62e178e19b15 (patch)
tree9658da6b96248325184892d66e551765574cae68
parent7e48abc764d7e4bd0c52f4111208c642317bfae1 (diff)
downloadbcm5719-llvm-5e9e86a538a185e130f33f46550b62e178e19b15.tar.gz
bcm5719-llvm-5e9e86a538a185e130f33f46550b62e178e19b15.zip
Reland "Install resource files into a share/ directory"
Currently these files are being installed into a root installation directory, but this triggers an error when the installation directory is set to an empty string which is often the case when DESTDIR is used to control the installation destination. Differential Revision: https://reviews.llvm.org/D41673 llvm-svn: 322234
-rw-r--r--compiler-rt/cmake/Modules/AddCompilerRT.cmake4
-rw-r--r--compiler-rt/lib/dfsan/CMakeLists.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 139b6140011..21f8fa794d8 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -431,7 +431,7 @@ endfunction()
macro(add_compiler_rt_resource_file target_name file_name component)
set(src_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_name}")
- set(dst_file "${COMPILER_RT_OUTPUT_DIR}/${file_name}")
+ set(dst_file "${COMPILER_RT_OUTPUT_DIR}/share/${file_name}")
add_custom_command(OUTPUT ${dst_file}
DEPENDS ${src_file}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src_file} ${dst_file}
@@ -439,7 +439,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
add_custom_target(${target_name} DEPENDS ${dst_file})
# Install in Clang resource directory.
install(FILES ${file_name}
- DESTINATION ${COMPILER_RT_INSTALL_PATH}
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
COMPONENT ${component})
add_dependencies(${component} ${target_name})
diff --git a/compiler-rt/lib/dfsan/CMakeLists.txt b/compiler-rt/lib/dfsan/CMakeLists.txt
index 2c486bff821..1cbc04ff275 100644
--- a/compiler-rt/lib/dfsan/CMakeLists.txt
+++ b/compiler-rt/lib/dfsan/CMakeLists.txt
@@ -44,4 +44,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
add_dependencies(dfsan dfsan_abilist)
install(FILES ${dfsan_abilist_filename}
- DESTINATION ${COMPILER_RT_INSTALL_PATH})
+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
OpenPOWER on IntegriCloud