aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-01-14 03:31:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-01-14 03:31:16 +0000
commit82fbac54624e752bc45364bb850e2f673ff7ebe1 (patch)
treef11ef47e73dc1a8455285773172c3cd109093567
parentbfcbc90938ad002af50445f78984d202e103465c (diff)
ccc: Darwin/Compiler: Improve gcc compat in use of -auxbase-strip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62213 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/ccc/ccclib/Tools.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 26200f1b9f..90723069a3 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -459,16 +459,16 @@ class Darwin_X86_CompileTool(Tool):
# FIXME: The goal is to use the user provided -o if that is
# our final output, otherwise to drive from the original input
- # name.
- #
- # This implementation is close, but gcc also does this for -S
- # which is broken, and it would be nice to find a cleaner way
- # which doesn't introduce a dependency on the output argument
- # we are given.
- outputOpt = arglist.getLastArg(arglist.parser.oOption)
- if outputOpt and outputOpt is output:
- cmd_args.append('-auxbase-strip')
- cmd_args.append(arglist.getValue(outputOpt))
+ # name. Find a clean way to go about this.
+ if (arglist.getLastArg(arglist.parser.cOption) or
+ arglist.getLastArg(arglist.parser.SOption)):
+ outputOpt = arglist.getLastArg(arglist.parser.oOption)
+ if outputOpt:
+ cmd_args.append('-auxbase-strip')
+ cmd_args.append(arglist.getValue(outputOpt))
+ else:
+ cmd_args.append('-auxbase')
+ cmd_args.append(self.getBaseInputStem(inputs, arglist))
else:
cmd_args.append('-auxbase')
cmd_args.append(self.getBaseInputStem(inputs, arglist))