summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/interception
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-08-08 09:46:51 +0000
committerAlexey Samsonov <samsonov@google.com>2012-08-08 09:46:51 +0000
commit4750230ac605e9327b08e5e5855901c5445d86a8 (patch)
tree214f98c1b21caf5c7cf341e8e3122def4f0bdbfd /compiler-rt/lib/interception
parent90653a192088088bf7f5373e26ecde4bac205285 (diff)
downloadbcm5719-llvm-4750230ac605e9327b08e5e5855901c5445d86a8.tar.gz
bcm5719-llvm-4750230ac605e9327b08e5e5855901c5445d86a8.zip
[Sanitizer] cleanup CMake files for interception and sanitizer_common helper libraries
llvm-svn: 161485
Diffstat (limited to 'compiler-rt/lib/interception')
-rw-r--r--compiler-rt/lib/interception/CMakeLists.txt33
1 files changed, 19 insertions, 14 deletions
diff --git a/compiler-rt/lib/interception/CMakeLists.txt b/compiler-rt/lib/interception/CMakeLists.txt
index 033b05fc1b3..3ebeb61f08e 100644
--- a/compiler-rt/lib/interception/CMakeLists.txt
+++ b/compiler-rt/lib/interception/CMakeLists.txt
@@ -13,25 +13,30 @@ if (APPLE)
list(APPEND INTERCEPTION_SOURCES mach_override/mach_override.c)
endif ()
-set(INTERCEPTION_CFLAGS "-fPIC -fno-exceptions -funwind-tables -fvisibility=hidden")
-if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
- set(INTERCEPTION_CFLAGS "${INTERCEPTION_CFLAGS} -Wno-variadic-macros")
-endif ()
+set(INTERCEPTION_CFLAGS
+ -O3
+ -fPIC
+ -fno-exceptions
+ -funwind-tables
+ -fvisibility=hidden
+ )
+if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
+ list(APPEND INTERCEPTION_CFLAGS -Wno-variadic-macros)
+endif()
-set(INTERCEPTION_COMMON_DEFINITIONS
- INTERCEPTION_HAS_EXCEPTIONS=1)
+set(INTERCEPTION_COMMON_DEFINITIONS)
if(CAN_TARGET_X86_64)
add_library(RTInterception.x86_64 OBJECT ${INTERCEPTION_SOURCES})
- set_property(TARGET RTInterception.x86_64 PROPERTY COMPILE_FLAGS
- "${INTERCEPTION_CFLAGS} ${TARGET_X86_64_CFLAGS}")
- set_property(TARGET RTInterception.x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
- ${INTERCEPTION_COMMON_DEFINITIONS})
+ set_target_compile_flags(RTInterception.x86_64
+ ${INTERCEPTION_CFLAGS} ${TARGET_X86_64_CFLAGS})
+ set_property(TARGET RTInterception.x86_64 APPEND PROPERTY
+ COMPILE_DEFINITIONS ${INTERCEPTION_COMMON_DEFINITIONS})
endif()
if(CAN_TARGET_I386)
add_library(RTInterception.i386 OBJECT ${INTERCEPTION_SOURCES})
- set_property(TARGET RTInterception.i386 PROPERTY COMPILE_FLAGS
- "${INTERCEPTION_CFLAGS} ${TARGET_I386_CFLAGS}")
- set_property(TARGET RTInterception.i386 APPEND PROPERTY COMPILE_DEFINITIONS
- ${INTERCEPTION_COMMON_DEFINITIONS})
+ set_target_compile_flags(RTInterception.i386
+ ${INTERCEPTION_CFLAGS} ${TARGET_I386_CFLAGS})
+ set_property(TARGET RTInterception.i386 APPEND PROPERTY
+ COMPILE_DEFINITIONS ${INTERCEPTION_COMMON_DEFINITIONS})
endif()
OpenPOWER on IntegriCloud