[cfe-commits] r64783 - /cfe/trunk/tools/ccc/ccclib/Tools.py

Daniel Dunbar daniel at zuster.org
Tue Feb 17 11:02:13 PST 2009


Author: ddunbar
Date: Tue Feb 17 13:02:12 2009
New Revision: 64783

URL: http://llvm.org/viewvc/llvm-project?rev=64783&view=rev
Log:
ccc: Pass -{MM,MMD,MF,MP,MT} to clang. Error on -{M,MM,MG,MQ} which
clang doesn't support yet.
 - See PR3603.

Modified:
    cfe/trunk/tools/ccc/ccclib/Tools.py

Modified: cfe/trunk/tools/ccc/ccclib/Tools.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Tools.py?rev=64783&r1=64782&r2=64783&view=diff

==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Tools.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Tools.py Tue Feb 17 13:02:12 2009
@@ -292,6 +292,19 @@
             
             # FIXME: Add --stack-protector-buffer-size=<xxx> on -fstack-protect.
 
+            arglist.addLastArg(cmd_args, arglist.parser.MDOption)
+            arglist.addLastArg(cmd_args, arglist.parser.MMDOption)
+            arglist.addAllArgs(cmd_args, arglist.parser.MFOption)
+            arglist.addLastArg(cmd_args, arglist.parser.MPOption)
+            arglist.addAllArgs(cmd_args, arglist.parser.MTOption)
+
+            unsupported = (arglist.getLastArg(arglist.parser.MOption) or
+                           arglist.getLastArg(arglist.parser.MMOption) or
+                           arglist.getLastArg(arglist.parser.MGOption) or
+                           arglist.getLastArg(arglist.parser.MQOption))
+            if unsupported:
+                raise NotImplementedError('clang support for "%s"' % unsupported.opt.name)
+
         arglist.addAllArgs(cmd_args, arglist.parser.vOption)
         arglist.addAllArgs2(cmd_args, arglist.parser.DOption, arglist.parser.UOption)
         arglist.addAllArgs2(cmd_args, arglist.parser.IGroup, arglist.parser.FOption)





More information about the cfe-commits mailing list