aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-14 02:03:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-14 02:03:00 +0000
commiteb840bd0e473ee11622e084a0d6ff276ee7aa5c6 (patch)
tree263381889e8e9e0bffdc401e3f2770ffbfbee21c /lib/Driver/Driver.cpp
parent7d94918334ff041b34240e5b031c7c15d838201a (diff)
Driver: Enable -integrated-as by default, at least for Darwin/x86 without -static.
- How else will we figure out what is broken, eh? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 0c1a5a3309..916cdba3ec 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -902,9 +902,16 @@ static const Tool &SelectToolForJob(Compilation &C, const ToolChain *TC,
// See if we should look for a compiler with an integrated assembler. We match
// bottom up, so what we are actually looking for is an assembler job with a
// compiler input.
- if (C.getArgs().hasArg(options::OPT_integrated_as,
+
+ // FIXME: This doesn't belong here, but ideally we will support static soon
+ // anyway.
+ bool HasStatic = (C.getArgs().hasArg(options::OPT_mkernel) ||
+ C.getArgs().hasArg(options::OPT_static) ||
+ C.getArgs().hasArg(options::OPT_fapple_kext));
+ bool IsIADefault = (TC->IsIntegratedAssemblerDefault() && !HasStatic);
+ if (C.getArgs().hasFlag(options::OPT_integrated_as,
options::OPT_no_integrated_as,
- TC->IsIntegratedAssemblerDefault()) &&
+ IsIADefault) &&
!C.getArgs().hasArg(options::OPT_save_temps) &&
isa<AssembleJobAction>(JA) &&
Inputs->size() == 1 && isa<CompileJobAction>(*Inputs->begin())) {