summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-09-09 20:41:01 +0000
committerJohn McCall <rjmccall@apple.com>2011-09-09 20:41:01 +0000
commit7959fee25860cc995964761a6bff9415947a44a4 (patch)
tree96490f32e5d1c119950c0f22c869d1c73cd38861 /clang/lib/Driver/Tools.cpp
parente1378a431305a1c8f3de6322255964d9b2c11503 (diff)
downloadbcm5719-llvm-7959fee25860cc995964761a6bff9415947a44a4.tar.gz
bcm5719-llvm-7959fee25860cc995964761a6bff9415947a44a4.zip
Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks. Removes a terrible hack where IR gen needed to find the declarations of those symbols in the translation unit. llvm-svn: 139404
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 3158a517fbd..691e96cb115 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1718,6 +1718,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.hasArg(options::OPT_fobjc_nonfragile_abi) &&
!Args.hasArg(options::OPT_fno_blocks))) {
CmdArgs.push_back("-fblocks");
+
+ if (!Args.hasArg(options::OPT_fgnu_runtime) &&
+ !getToolChain().hasBlocksRuntime())
+ CmdArgs.push_back("-fblocks-runtime-optional");
}
// -faccess-control is default.
OpenPOWER on IntegriCloud