[cfe-commits] r62154 - in /cfe/trunk/tools/ccc/ccclib: Arguments.py Tools.py
Daniel Dunbar
daniel at zuster.org
Mon Jan 12 22:44:28 PST 2009
Author: ddunbar
Date: Tue Jan 13 00:44:28 2009
New Revision: 62154
URL: http://llvm.org/viewvc/llvm-project?rev=62154&view=rev
Log:
ccc: Darwin/Link also runs dsymutil in one very particular situation.
Modified:
cfe/trunk/tools/ccc/ccclib/Arguments.py
cfe/trunk/tools/ccc/ccclib/Tools.py
Modified: cfe/trunk/tools/ccc/ccclib/Arguments.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Arguments.py?rev=62154&r1=62153&r2=62154&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Arguments.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Arguments.py Tue Jan 13 00:44:28 2009
@@ -689,6 +689,8 @@
self.addOption(JoinedOption('-d', group=self.dGroup))
self.gGroup = OptionGroup('-g')
+ 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))
Modified: cfe/trunk/tools/ccc/ccclib/Tools.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Tools.py?rev=62154&r1=62153&r2=62154&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Tools.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Tools.py Tue Jan 13 00:44:28 2009
@@ -879,10 +879,17 @@
jobs.addJob(Jobs.Command(self.toolChain.getProgramPath('collect2'),
cmd_args))
- # FIXME: We need to add a dsymutil job here in some particular
- # cases (basically whenever we have a c-family input we are
- # compiling, I think). Find out why this is the condition, and
- # implement. See link_command spec for more details.
+ if (arglist.getLastArg(arglist.parser.gGroup) and
+ not arglist.getLastArg(arglist.parser.gstabsOption) and
+ not arglist.getLastArg(arglist.parser.g0Option)):
+ # FIXME: This is gross, but matches gcc. The test only
+ # considers the suffix (not the -x type), and then only of the
+ # first input.
+ inputSuffix = os.path.splitext(arglist.getValue(inputs[0].baseInput))[1]
+ if inputSuffix in ('.c','.cc','.C','.cpp','.cp',
+ '.c++','.cxx','.CPP','.m','.mm'):
+ jobs.addJob(Jobs.Command('dsymutil',
+ arglist.renderAsInput(output)))
class LipoTool(Tool):
def __init__(self):
More information about the cfe-commits
mailing list