summaryrefslogtreecommitdiff
path: root/lib/dfsan
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-01-14 03:43:14 +0000
committerPetr Hosek <phosek@chromium.org>2018-01-14 03:43:14 +0000
commitb6c53ea52b940b112e537eec394400e58c69c5df (patch)
treebd6d2c3b83fbe4b11ae8e329719b333e785c1931 /lib/dfsan
parentcc0796dba41decd108241a826de71ee4b8dacbd3 (diff)
downloadcompiler-rt-b6c53ea52b940b112e537eec394400e58c69c5df.tar.gz
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@322451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/dfsan')
-rw-r--r--lib/dfsan/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
index 2c486bff8..8e88c3b62 100644
--- a/lib/dfsan/CMakeLists.txt
+++ b/lib/dfsan/CMakeLists.txt
@@ -32,16 +32,19 @@ 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_dir ${COMPILER_RT_OUTPUT_DIR}/share)
+set(dfsan_abilist_filename ${dfsan_abilist_dir}/dfsan_abilist.txt)
add_custom_target(dfsan_abilist ALL
DEPENDS ${dfsan_abilist_filename})
add_custom_command(OUTPUT ${dfsan_abilist_filename}
VERBATIM
COMMAND
+ ${CMAKE_COMMAND} -E make_directory ${dfsan_abilist_dir}
+ COMMAND
cat ${CMAKE_CURRENT_SOURCE_DIR}/done_abilist.txt
${CMAKE_CURRENT_SOURCE_DIR}/libc_ubuntu1404_abilist.txt
> ${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)