diff options
| author | Chris Bieneman <beanz@apple.com> | 2016-02-23 21:50:39 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2016-02-23 21:50:39 +0000 |
| commit | 86792ea71808f83fd1c221bec33a0b5b6c1a1383 (patch) | |
| tree | ac789f8b5378bf0931fe5704af3da3be5804c13f | |
| parent | 87442c1133ce0c4d7ee8e95b1f6fe019033fbca3 (diff) | |
| download | bcm5719-llvm-86792ea71808f83fd1c221bec33a0b5b6c1a1383.tar.gz bcm5719-llvm-86792ea71808f83fd1c221bec33a0b5b6c1a1383.zip | |
[CMake] Assign components and dependencies during add_compiler_rt_resource_file
This makes it so that component-based installations will include resource files (i.e. blacklists). My next patch will add support for component-based installations.
llvm-svn: 261699
| -rw-r--r-- | compiler-rt/cmake/Modules/AddCompilerRT.cmake | 7 | ||||
| -rw-r--r-- | compiler-rt/lib/asan/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | compiler-rt/lib/cfi/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | compiler-rt/lib/msan/CMakeLists.txt | 3 |
4 files changed, 8 insertions, 8 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake index b64a6180587..bb65f58c9b9 100644 --- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake +++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake @@ -242,7 +242,7 @@ macro(add_compiler_rt_test test_suite test_name) add_dependencies(${test_suite} ${test_name}) endmacro() -macro(add_compiler_rt_resource_file target_name file_name) +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}") add_custom_command(OUTPUT ${dst_file} @@ -251,7 +251,10 @@ macro(add_compiler_rt_resource_file target_name file_name) COMMENT "Copying ${file_name}...") add_custom_target(${target_name} DEPENDS ${dst_file}) # Install in Clang resource directory. - install(FILES ${file_name} DESTINATION ${COMPILER_RT_INSTALL_PATH}) + install(FILES ${file_name} + DESTINATION ${COMPILER_RT_INSTALL_PATH} + COMPONENT ${component}) + add_dependencies(${component} ${target_name}) endmacro() macro(add_compiler_rt_script name) diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt index 6716f48b22b..3a29ba830be 100644 --- a/compiler-rt/lib/asan/CMakeLists.txt +++ b/compiler-rt/lib/asan/CMakeLists.txt @@ -219,8 +219,7 @@ else() endforeach() endif() -add_compiler_rt_resource_file(asan_blacklist asan_blacklist.txt) -add_dependencies(asan asan_blacklist) +add_compiler_rt_resource_file(asan_blacklist asan_blacklist.txt asan) add_dependencies(compiler-rt asan) add_subdirectory(scripts) diff --git a/compiler-rt/lib/cfi/CMakeLists.txt b/compiler-rt/lib/cfi/CMakeLists.txt index ec428a25af5..5e79528cf91 100644 --- a/compiler-rt/lib/cfi/CMakeLists.txt +++ b/compiler-rt/lib/cfi/CMakeLists.txt @@ -34,6 +34,5 @@ foreach(arch ${CFI_SUPPORTED_ARCH}) PARENT_TARGET cfi) endforeach() -add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt) -add_dependencies(cfi cfi_blacklist) +add_compiler_rt_resource_file(cfi_blacklist cfi_blacklist.txt cfi) add_dependencies(compiler-rt cfi) diff --git a/compiler-rt/lib/msan/CMakeLists.txt b/compiler-rt/lib/msan/CMakeLists.txt index 1b48def4628..fb75daeb949 100644 --- a/compiler-rt/lib/msan/CMakeLists.txt +++ b/compiler-rt/lib/msan/CMakeLists.txt @@ -58,8 +58,7 @@ foreach(arch ${MSAN_SUPPORTED_ARCH}) endif() endforeach() -add_compiler_rt_resource_file(msan_blacklist msan_blacklist.txt) -add_dependencies(msan msan_blacklist) +add_compiler_rt_resource_file(msan_blacklist msan_blacklist.txt msan) add_dependencies(compiler-rt msan) if(COMPILER_RT_INCLUDE_TESTS) |

