diff options
author | John McCall <rjmccall@apple.com> | 2011-09-09 20:41:01 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-09-09 20:41:01 +0000 |
commit | 13db5cfc4e5f03eb70efe0d227b53b8280f16161 (patch) | |
tree | 94795d436a9e5021d700babc08f1fcb34e0465bf /lib/Driver/Tools.cpp | |
parent | 88914801a4d73e321c6f74f97df7d7b11c298bc6 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 3158a517fb..691e96cb11 100644 --- a/lib/Driver/Tools.cpp +++ b/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. |