diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2011-02-28 17:11:43 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2011-02-28 17:11:43 +0000 |
commit | e6533ffc680e84cd193b4ea0d81548e251cb1f2f (patch) | |
tree | 71b9eecc18e5b80fd8f527a7f5bba27912afa87c /lib/Driver/Tools.cpp | |
parent | b166e4acfd17acb2384b46fadb8678f7cce3f672 (diff) |
Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 6f373658eb..830cd56acb 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1459,7 +1459,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // -fblocks=0 is default. if (Args.hasFlag(options::OPT_fblocks, options::OPT_fno_blocks, - getToolChain().IsBlocksDefault())) { + getToolChain().IsBlocksDefault()) || + (Args.hasArg(options::OPT_fgnu_runtime) && + Args.hasArg(options::OPT_fobjc_nonfragile_abi) && + !Args.hasArg(options::OPT_fno_blocks))) { CmdArgs.push_back("-fblocks"); } |