From 970bd309ef0863d3ec2cc281533f41498f45e4d7 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Wed, 6 Jan 2016 23:15:04 +0000 Subject: [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 --- cmake/config-ix.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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}) -- cgit v1.2.3