summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2013-11-07 10:08:19 +0000
committerAlexander Potapenko <glider@google.com>2013-11-07 10:08:19 +0000
commit49496747758bf44163768ce3e07e40c8f95ccba9 (patch)
tree894adbc0718aac47996d64de69114deb53d72953 /lib/sanitizer_common/CMakeLists.txt
parentf16dc4234098a22a9d0d56f0198d87905481e7fd (diff)
downloadcompiler-rt-49496747758bf44163768ce3e07e40c8f95ccba9.tar.gz
compiler-rt-49496747758bf44163768ce3e07e40c8f95ccba9.tar.bz2
compiler-rt-49496747758bf44163768ce3e07e40c8f95ccba9.tar.xz
[ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib
CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code. The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/CMakeLists.txt')
-rw-r--r--lib/sanitizer_common/CMakeLists.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/sanitizer_common/CMakeLists.txt b/lib/sanitizer_common/CMakeLists.txt
index 8c2f2e40..4ec37195 100644
--- a/lib/sanitizer_common/CMakeLists.txt
+++ b/lib/sanitizer_common/CMakeLists.txt
@@ -79,11 +79,13 @@ endif()
set(SANITIZER_RUNTIME_LIBRARIES)
if(APPLE)
# Build universal binary on APPLE.
- add_compiler_rt_osx_object_library(RTSanitizerCommon
- ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
- SOURCES ${SANITIZER_SOURCES} ${SANITIZER_LIBCDEP_SOURCES}
- CFLAGS ${SANITIZER_CFLAGS})
- list(APPEND SANITIZER_RUNTIME_LIBRARIES RTSanitizerCommon.osx)
+ foreach(os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS})
+ add_compiler_rt_darwin_object_library(RTSanitizerCommon ${os}
+ ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH}
+ SOURCES ${SANITIZER_SOURCES} ${SANITIZER_LIBCDEP_SOURCES}
+ CFLAGS ${SANITIZER_CFLAGS})
+ list(APPEND SANITIZER_RUNTIME_LIBRARIES RTSanitizerCommon.${os})
+ endforeach()
elseif(ANDROID)
add_library(RTSanitizerCommon.arm.android OBJECT
${SANITIZER_SOURCES} ${SANITIZER_LIBCDEP_SOURCES})