[llvm-commits] [compiler-rt] r161485 - in /compiler-rt/trunk/lib: interception/CMakeLists.txt sanitizer_common/CMakeLists.txt

Alexey Samsonov samsonov at google.com
Wed Aug 8 02:46:52 PDT 2012


Author: samsonov
Date: Wed Aug  8 04:46:51 2012
New Revision: 161485

URL: http://llvm.org/viewvc/llvm-project?rev=161485&view=rev
Log:
[Sanitizer] cleanup CMake files for interception and sanitizer_common helper libraries

Modified:
    compiler-rt/trunk/lib/interception/CMakeLists.txt
    compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt

Modified: compiler-rt/trunk/lib/interception/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/CMakeLists.txt?rev=161485&r1=161484&r2=161485&view=diff
==============================================================================
--- compiler-rt/trunk/lib/interception/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/interception/CMakeLists.txt Wed Aug  8 04:46:51 2012
@@ -13,25 +13,30 @@
   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()

Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=161485&r1=161484&r2=161485&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Wed Aug  8 04:46:51 2012
@@ -15,23 +15,27 @@
   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()





More information about the llvm-commits mailing list