aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-17 19:02:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-17 19:02:12 +0000
commitd563e52c37561e2657bf7af4e36f399310e405b1 (patch)
tree710204c761aa7f3691a16e34520ef6dcb09d8f25
parent2846584793cd8ed3c02b4555c3d09d216dbdcc1c (diff)
ccc: Pass -{MM,MMD,MF,MP,MT} to clang. Error on -{M,MM,MG,MQ} which
clang doesn't support yet. - See PR3603. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64783 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/ccc/ccclib/Tools.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 2ca0a417e8..e2d0e9e410 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -292,6 +292,19 @@ class Clang_CompileTool(Tool):
# 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)