diff --git a/clang/tools/ccc/ccclib/Arguments.py b/clang/tools/ccc/ccclib/Arguments.py index 184e33303176..625ec5152460 100644 --- a/clang/tools/ccc/ccclib/Arguments.py +++ b/clang/tools/ccc/ccclib/Arguments.py @@ -745,6 +745,7 @@ class OptionParser: # FIXME: Naming convention. self.dGroup = OptionGroup('-d') self.dAOption = self.addOption(FlagOption('-dA', self.dGroup)) + self.dMOption = self.addOption(FlagOption('-dM', self.dGroup)) self.dOption = self.addOption(FlagOption('-d', self.dGroup)) # Use a group for this in anticipation of adding more -d diff --git a/clang/tools/ccc/ccclib/Tools.py b/clang/tools/ccc/ccclib/Tools.py index 4b600af44837..0f59f6962398 100644 --- a/clang/tools/ccc/ccclib/Tools.py +++ b/clang/tools/ccc/ccclib/Tools.py @@ -321,6 +321,8 @@ class Clang_CompileTool(Tool): arglist.addAllArgs(cmd_args, arglist.parser.Clang_fGroup) + arglist.addLastArg(cmd_args, arglist.parser.dMOption) + for arg in arglist.getArgs(arglist.parser.XclangOption): cmd_args.extend(arglist.getValues(arg))