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
diff --git a/tools/ccc/ccclib/Tools.py b/tools/ccc/ccclib/Tools.py
index 2ca0a41..e2d0e9e 100644
--- a/tools/ccc/ccclib/Tools.py
+++ b/tools/ccc/ccclib/Tools.py
@@ -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)