From 49496747758bf44163768ce3e07e40c8f95ccba9 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 7 Nov 2013 10:08:19 +0000 Subject: [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 --- lib/interception/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/interception/CMakeLists.txt') diff --git a/lib/interception/CMakeLists.txt b/lib/interception/CMakeLists.txt index cd9e6e75..1dfdaffb 100644 --- a/lib/interception/CMakeLists.txt +++ b/lib/interception/CMakeLists.txt @@ -13,10 +13,12 @@ set(INTERCEPTION_CFLAGS ${SANITIZER_COMMON_CFLAGS}) if(APPLE) # Build universal binary on APPLE. - add_compiler_rt_osx_object_library(RTInterception - ARCH ${SANITIZER_COMMON_SUPPORTED_ARCH} - SOURCES ${INTERCEPTION_SOURCES} - CFLAGS ${INTERCEPTION_CFLAGS}) + 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() elseif(ANDROID) add_library(RTInterception.arm.android OBJECT ${INTERCEPTION_SOURCES}) set_target_compile_flags(RTInterception.arm.android -- cgit v1.2.3