summaryrefslogtreecommitdiffstats
path: root/compiler-rt
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
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')
-rw-r--r--compiler-rt/lib/interception/CMakeLists.txt33
-rw-r--r--compiler-rt/lib/sanitizer_common/CMakeLists.txt28
2 files changed, 35 insertions, 26 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()
diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
index 5c55f430a2a..7780f0b6455 100644
--- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
@@ -15,23 +15,27 @@ set(SANITIZER_SOURCES
sanitizer_win.cc
)
-set(SANITIZER_CFLAGS "-fPIC -fno-exceptions -funwind-tables -fvisibility=hidden")
-
-set(SANITIZER_COMMON_DEFINITIONS
- SANITIZER_HAS_EXCEPTIONS=1
+set(SANITIZER_CFLAGS
+ -O3
+ -fPIC
+ -fno-exceptions
+ -funwind-tables
+ -fvisibility=hidden
)
+set(SANITIZER_COMMON_DEFINITIONS)
+
if(CAN_TARGET_X86_64)
add_library(RTSanitizerCommon.x86_64 OBJECT ${SANITIZER_SOURCES})
- set_property(TARGET RTSanitizerCommon.x86_64 PROPERTY COMPILE_FLAGS
- "${SANITIZER_CFLAGS} ${TARGET_X86_64_CFLAGS}")
- set_property(TARGET RTSanitizerCommon.x86_64 APPEND PROPERTY COMPILE_DEFINITIONS
- ${SANITIZER_COMMON_DEFINITIONS})
+ set_target_compile_flags(RTSanitizerCommon.x86_64
+ ${SANITIZER_CFLAGS} ${TARGET_X86_64_CFLAGS})
+ set_property(TARGET RTSanitizerCommon.x86_64 APPEND PROPERTY
+ COMPILE_DEFINITIONS ${SANITIZER_COMMON_DEFINITIONS})
endif()
if(CAN_TARGET_I386)
add_library(RTSanitizerCommon.i386 OBJECT ${SANITIZER_SOURCES})
- set_property(TARGET RTSanitizerCommon.i386 PROPERTY COMPILE_FLAGS
- "${SANITIZER_CFLAGS} ${TARGET_I386_CFLAGS}")
- set_property(TARGET RTSanitizerCommon.i386 APPEND PROPERTY COMPILE_DEFINITIONS
- ${SANITIZER_COMMON_DEFINITIONS})
+ set_target_compile_flags(RTSanitizerCommon.i386
+ ${SANITIZER_CFLAGS} ${TARGET_I386_CFLAGS})
+ set_property(TARGET RTSanitizerCommon.i386 APPEND PROPERTY
+ COMPILE_DEFINITIONS ${SANITIZER_COMMON_DEFINITIONS})
endif()
OpenPOWER on IntegriCloud