ccc: Darwin/X86: gcc compatibility, only add

'-feliminate-unused-debug-symbols' in reponse to '-g' (not '-g*').

llvm-svn: 62357
This commit is contained in:
Daniel Dunbar 2009-01-16 21:07:21 +00:00
parent 968e2e7b3d
commit 245df5f4ac
2 changed files with 4 additions and 2 deletions

View File

@ -721,7 +721,9 @@ class OptionParser:
self.gstabsOption = self.addOption(JoinedOption('-gstabs', self.gGroup))
self.g0Option = self.addOption(JoinedOption('-g0', self.gGroup))
self.g3Option = self.addOption(JoinedOption('-g3', self.gGroup))
self.gOption = self.addOption(JoinedOption('-g', self.gGroup))
# FIXME: Naming.
self.gOption = self.addOption(FlagOption('-g', self.gGroup))
self.addOption(JoinedOption('-g', self.gGroup))
# FIXME: How should we handle clang specific options? Do we
# want to avoid passing them to gcc/cc1 (which will generally

View File

@ -326,7 +326,7 @@ class Darwin_X86_CompileTool(Tool):
# FIXME: Remove mcpu=G4
# FIXME: Remove mcpu=G5
if (arglist.getLastArg(arglist.parser.gGroup) and
if (arglist.getLastArg(arglist.parser.gOption) and
not arglist.getLastArg(arglist.parser.f_noEliminateUnusedDebugSymbolsOption)):
cmd_args.append('-feliminate-unused-debug-symbols')