diff options
author | Petr Hosek <phosek@chromium.org> | 2018-01-11 06:42:10 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-01-11 06:42:10 +0000 |
commit | 17850f67fff8cf60a3468ee35bda21a4cc43aeff (patch) | |
tree | 33ddb5076b1629da98a9af003411beeeea00b615 | |
parent | e5fbf591a7fde1e019944746d0cbc75c6cb131e4 (diff) | |
download | bcm5719-llvm-17850f67fff8cf60a3468ee35bda21a4cc43aeff.tar.gz bcm5719-llvm-17850f67fff8cf60a3468ee35bda21a4cc43aeff.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: 322256
-rw-r--r-- | compiler-rt/cmake/Modules/AddCompilerRT.cmake | 4 | ||||
-rw-r--r-- | compiler-rt/lib/dfsan/CMakeLists.txt | 4 |
2 files changed, 4 insertions, 4 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..2df18ce0d8d 100644 --- a/compiler-rt/lib/dfsan/CMakeLists.txt +++ b/compiler-rt/lib/dfsan/CMakeLists.txt @@ -32,7 +32,7 @@ foreach(arch ${DFSAN_SUPPORTED_ARCH}) clang_rt.dfsan-${arch}-symbols) endforeach() -set(dfsan_abilist_filename ${COMPILER_RT_OUTPUT_DIR}/dfsan_abilist.txt) +set(dfsan_abilist_filename ${COMPILER_RT_OUTPUT_DIR}/share/dfsan_abilist.txt) add_custom_target(dfsan_abilist ALL DEPENDS ${dfsan_abilist_filename}) add_custom_command(OUTPUT ${dfsan_abilist_filename} @@ -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) |