From d79d80b4a0d01798e915a2b21256bff2a68188aa Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 24 Aug 2012 07:49:22 +0000 Subject: [PATCH] Add add_clang_runtime_shared_library() CMake function and use it to put the shared ASan runtime in the appropriate place. llvm-svn: 162546 --- compiler-rt/lib/CMakeLists.txt | 4 ++++ compiler-rt/lib/asan/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+) diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt index 72ab9b470d6f..4961e2d0c207 100644 --- a/compiler-rt/lib/CMakeLists.txt +++ b/compiler-rt/lib/CMakeLists.txt @@ -19,6 +19,10 @@ function(add_clang_runtime_static_library) set_target_properties(${ARGN} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CLANG_RUNTIME_LIB_DIR}) endfunction() +function(add_clang_runtime_shared_library) + set_target_properties(${ARGN} PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CLANG_RUNTIME_LIB_DIR}) +endfunction() # First, add the subdirectories which contain feature-based runtime libraries # and several convenience helper libraries. diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt index 7f552b07245b..d626d3b488ec 100644 --- a/compiler-rt/lib/asan/CMakeLists.txt +++ b/compiler-rt/lib/asan/CMakeLists.txt @@ -116,6 +116,7 @@ if(APPLE) LINK_FLAGS "-framework Foundation") list(APPEND ASAN_DYNAMIC_RUNTIME_LIBRARIES clang_rt.asan_osx_dynamic) endif() +add_clang_runtime_shared_library(${ASAN_DYNAMIC_RUNTIME_LIBRARIES}) if(LLVM_INCLUDE_TESTS)