summaryrefslogtreecommitdiff
path: root/lib/interception/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-01-18 16:51:07 +0000
committerAlexey Samsonov <samsonov@google.com>2013-01-18 16:51:07 +0000
commit43b4b9c18a7a588a60b9d976391ad8e2f5f9a309 (patch)
tree7ed618e62e12ce199f079a5a8cc3b0b7a8e3fa4c /lib/interception/CMakeLists.txt
parentdedba5d6b0664218b1b1109f024a1ab151642776 (diff)
downloadcompiler-rt-43b4b9c18a7a588a60b9d976391ad8e2f5f9a309.tar.gz
compiler-rt-43b4b9c18a7a588a60b9d976391ad8e2f5f9a309.tar.bz2
compiler-rt-43b4b9c18a7a588a60b9d976391ad8e2f5f9a309.tar.xz
CMake: Generalize build rules for different arches for sanitizer_common, asan, ubsan
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception/CMakeLists.txt')
-rw-r--r--lib/interception/CMakeLists.txt13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/interception/CMakeLists.txt b/lib/interception/CMakeLists.txt
index 76404091..ca59f2b8 100644
--- a/lib/interception/CMakeLists.txt
+++ b/lib/interception/CMakeLists.txt
@@ -24,21 +24,16 @@ if(APPLE)
# Build universal binary on APPLE.
add_library(RTInterception.osx OBJECT ${INTERCEPTION_SOURCES})
set_target_compile_flags(RTInterception.osx ${INTERCEPTION_CFLAGS})
- filter_available_targets(INTERCEPTION_TARGETS x86_64 i386)
set_target_properties(RTInterception.osx PROPERTIES
- OSX_ARCHITECTURES "${INTERCEPTION_TARGETS}")
+ OSX_ARCHITECTURES "${SANITIZER_COMMON_SUPPORTED_ARCH}")
elseif(ANDROID)
add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES})
set_target_compile_flags(RTInterception.arm.android
${INTERCEPTION_CFLAGS})
else()
# Otherwise, build separate libraries for each target.
- if(CAN_TARGET_x86_64)
- add_compiler_rt_object_library(RTInterception x86_64
+ foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
+ add_compiler_rt_object_library(RTInterception ${arch}
SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
- endif()
- if (CAN_TARGET_i386)
- add_compiler_rt_object_library(RTInterception i386
- SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
- endif()
+ endforeach()
endif()