summaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2016-01-06 23:15:04 +0000
committerAnna Zaks <ganna@apple.com>2016-01-06 23:15:04 +0000
commit970bd309ef0863d3ec2cc281533f41498f45e4d7 (patch)
tree007c0c7a6eeac6967dbad9be547e70ad28f7738a /cmake/config-ix.cmake
parent89251b08eb4bd2111bd50c72b947370e06e3acaa (diff)
[compiler-rt] On Darwin, link all frameworks with -fapplication-extension
The ASan dylib as well as other compiler-rt dylibs work with app extensions, so we should add -fapplication-extension to the link line when building them. This will avoid linker warnings when using the dylibs in app extensions. (APIs unavailable to app extensions are listed here: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionOverview.html#//apple_ref/doc/uid/TP40014214-CH2-SW6) Differential Revision: http://reviews.llvm.org/D15550 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@256989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rw-r--r--cmake/config-ix.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index ba2123862..4a3fbe47b 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -334,6 +334,11 @@ if(APPLE)
-lc++
-lc++abi)
+ check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION)
+ if(COMPILER_RT_HAS_APP_EXTENSION)
+ list(APPEND DARWIN_COMMON_LINKFLAGS "-fapplication-extension")
+ endif()
+
set(DARWIN_osx_CFLAGS
${DARWIN_COMMON_CFLAGS}
-mmacosx-version-min=${SANITIZER_MIN_OSX_VERSION})