aboutsummaryrefslogtreecommitdiff
path: root/tools/ccc/ccclib/Driver.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-20 01:53:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-20 01:53:54 +0000
commitfce72bc19c775b71edc21a2a710a9d7f02251aa6 (patch)
treee894f97267ea8d52e072d358247f8d5dd3f7cb64 /tools/ccc/ccclib/Driver.py
parentd24d25533b021ce0b68213b25754284121b52995 (diff)
ccc: Recognize that -M and -MM only run preprocessor.
- Clean up some placement of output args to match gcc more precisely (for testing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/ccc/ccclib/Driver.py')
-rw-r--r--tools/ccc/ccclib/Driver.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index e52640e252..96225664f4 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -338,6 +338,8 @@ class Driver(object):
hasDashC = args.getLastArg(self.parser.cOption)
hasDashE = args.getLastArg(self.parser.EOption)
hasDashS = args.getLastArg(self.parser.SOption)
+ hasDashM = args.getLastArg(self.parser.MOption)
+ hasDashMM = args.getLastArg(self.parser.MMOption)
inputType = None
inputTypeOpt = None
@@ -401,7 +403,7 @@ class Driver(object):
finalPhaseOpt = None
# Determine what compilation mode we are in.
- if hasDashE:
+ if hasDashE or hasDashM or hasDashMM:
finalPhase = Phases.Phase.eOrderPreprocess
finalPhaseOpt = hasDashE
elif hasSyntaxOnly:
@@ -520,14 +522,12 @@ class Driver(object):
# FIXME: We need to handle canonicalization of the specified arch.
archs = []
- hasDashM = None
+ hasDashM = args.getLastArg(self.parser.MGroup)
hasSaveTemps = (args.getLastArg(self.parser.saveTempsOption) or
args.getLastArg(self.parser.saveTempsOption2))
for arg in args:
if arg.opt is self.parser.archOption:
archs.append(arg)
- elif arg.opt.name.startswith('-M'):
- hasDashM = arg
if not archs:
archs.append(args.makeSeparateArg(self.hostInfo.getArchName(args),