From 245df5f4ac2061c23efc51e57c2723e253571360 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 16 Jan 2009 21:07:21 +0000 Subject: [PATCH] ccc: Darwin/X86: gcc compatibility, only add '-feliminate-unused-debug-symbols' in reponse to '-g' (not '-g*'). llvm-svn: 62357 --- clang/tools/ccc/ccclib/Arguments.py | 4 +++- clang/tools/ccc/ccclib/Tools.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/tools/ccc/ccclib/Arguments.py b/clang/tools/ccc/ccclib/Arguments.py index 4a7581a7a19d..075d3b909f4b 100644 --- a/clang/tools/ccc/ccclib/Arguments.py +++ b/clang/tools/ccc/ccclib/Arguments.py @@ -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 diff --git a/clang/tools/ccc/ccclib/Tools.py b/clang/tools/ccc/ccclib/Tools.py index ce87d38255c2..da258673ff09 100644 --- a/clang/tools/ccc/ccclib/Tools.py +++ b/clang/tools/ccc/ccclib/Tools.py @@ -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')