[PATCH] [CMake] Cleanup add_compiler_rt_object_library to be platform-agnostic
Alexey Samsonov
vonosmas at gmail.com
Tue Jun 9 18:09:25 PDT 2015
LGTM, but please address comments below.
================
Comment at: lib/interception/CMakeLists.txt:15
@@ -14,16 +14,3 @@
-if(APPLE)
- # Build universal binary on APPLE.
- foreach(os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS})
- add_compiler_rt_darwin_object_library(RTInterception ${os}
- ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
- SOURCES ${INTERCEPTION_SOURCES}
- CFLAGS ${INTERCEPTION_CFLAGS})
- endforeach()
-else()
- # Otherwise, build separate libraries for each target.
- foreach(arch ${SANITIZER_COMMON_SUPPORTED_ARCH})
- add_compiler_rt_object_library(RTInterception ${arch}
- SOURCES ${INTERCEPTION_SOURCES} CFLAGS ${INTERCEPTION_CFLAGS})
- endforeach()
-endif()
+add_compiler_rt_object_libraries(RTInterception
+ OS ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS}
----------------
Here as well. Or rename `SANITIZER_COMMON_SUPPORTED_DARWIN_OS` to smth. more appropriate first.
================
Comment at: lib/lsan/CMakeLists.txt:22
@@ +21,3 @@
+add_compiler_rt_object_libraries(RTLSanCommon
+ OS ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS}
+ ARCH ${LSAN_COMMON_SUPPORTED_ARCH}
----------------
I'd still use
if (APPLE)
clause here and avoid using reference to `DARWIN_OS` on Linux.
http://reviews.llvm.org/D10250
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list