diff options
author | Petr Hosek <phosek@chromium.org> | 2018-06-28 03:11:52 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2018-06-28 03:11:52 +0000 |
commit | e68c4e60449e68193ad2479e453715dcb94d59ec (patch) | |
tree | fe768a39c80dfe37d1813372263d228c29f8238e /cmake/Modules/SanitizerUtils.cmake | |
parent | 7304174d41ce890097c935e137d5ae864efa01f9 (diff) |
Support for multiarch runtimes layout
This change adds a support for multiarch style runtimes layout, so in
addition to the existing layout where runtimes get installed to:
lib/clang/$version/lib/$os
Clang now allows runtimes to be installed to:
lib/clang/$version/$target/lib
This also includes libc++, libc++abi and libunwind; today those are
assumed to be in Clang library directory built for host, with the
new layout it is possible to install libc++, libc++abi and libunwind
into the runtime directory built for different targets.
The use of new layout is enabled by setting the
LLVM_ENABLE_RUNTIME_TARGET_DIR CMake variable and is supported by both
projects and runtimes layouts. The runtimes CMake build has been further
modified to use the new layout when building runtimes for multiple
targets.
Differential Revision: https://reviews.llvm.org/D45604
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/SanitizerUtils.cmake')
-rw-r--r-- | cmake/Modules/SanitizerUtils.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/Modules/SanitizerUtils.cmake b/cmake/Modules/SanitizerUtils.cmake index f5dffb363..b6312426c 100644 --- a/cmake/Modules/SanitizerUtils.cmake +++ b/cmake/Modules/SanitizerUtils.cmake @@ -1,3 +1,5 @@ +include(CompilerRTUtils) + set(SANITIZER_GEN_DYNAMIC_LIST ${COMPILER_RT_SOURCE_DIR}/lib/sanitizer_common/scripts/gen_dynamic_list.py) @@ -37,9 +39,9 @@ macro(add_sanitizer_rt_symbols name) add_custom_target(${target_name}-symbols ALL DEPENDS ${stamp} SOURCES ${SANITIZER_GEN_DYNAMIC_LIST} ${ARG_EXTRA}) - + get_compiler_rt_install_dir(${arch} install_dir) install(FILES $<TARGET_FILE:${target_name}>.syms - DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}) + DESTINATION ${install_dir}) if(ARG_PARENT_TARGET) add_dependencies(${ARG_PARENT_TARGET} ${target_name}-symbols) endif() |