summaryrefslogtreecommitdiff
path: root/lib/interception
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-01-18 16:05:21 +0000
committerAlexey Samsonov <samsonov@google.com>2013-01-18 16:05:21 +0000
commit392c50d4a56557a51a353509c665188aef115f74 (patch)
tree1c17bf1f8845bf70681a8434e07c496618b3fca1 /lib/interception
parentd6bc93e1f1f9eb1d3cd1ce88891dc5fe28d051f9 (diff)
CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception')
-rw-r--r--lib/interception/CMakeLists.txt21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/interception/CMakeLists.txt b/lib/interception/CMakeLists.txt
index 1e25214a9..764040916 100644
--- a/lib/interception/CMakeLists.txt
+++ b/lib/interception/CMakeLists.txt
@@ -27,21 +27,18 @@ if(APPLE)
filter_available_targets(INTERCEPTION_TARGETS x86_64 i386)
set_target_properties(RTInterception.osx PROPERTIES
OSX_ARCHITECTURES "${INTERCEPTION_TARGETS}")
+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_library(RTInterception.x86_64 OBJECT ${INTERCEPTION_SOURCES})
- set_target_compile_flags(RTInterception.x86_64
- ${INTERCEPTION_CFLAGS} ${TARGET_x86_64_CFLAGS})
+ add_compiler_rt_object_library(RTInterception x86_64
+ SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
endif()
- if(CAN_TARGET_i386)
- add_library(RTInterception.i386 OBJECT ${INTERCEPTION_SOURCES})
- set_target_compile_flags(RTInterception.i386
- ${INTERCEPTION_CFLAGS} ${TARGET_i386_CFLAGS})
- endif()
- if(ANDROID)
- add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES})
- set_target_compile_flags(RTInterception.arm.android
- ${INTERCEPTION_CFLAGS})
+ if (CAN_TARGET_i386)
+ add_compiler_rt_object_library(RTInterception i386
+ SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
endif()
endif()