summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2015-04-27 18:14:32 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2015-04-27 18:14:32 +0000
commitd7214a7651db3dc153f239fe6f1603d865c64b03 (patch)
tree5455a579bb7d616c30e7195887f67b6c43f1a0a1 /clang/lib/Frontend/CompilerInvocation.cpp
parent8fd573e87fd924f67cf0bf0ce021282aa7f81042 (diff)
downloadbcm5719-llvm-d7214a7651db3dc153f239fe6f1603d865c64b03.tar.gz
bcm5719-llvm-d7214a7651db3dc153f239fe6f1603d865c64b03.zip
Support generating NMake/Jom-style depfiles.
NMake is a Make-like builder that comes with Microsoft Visual Studio. Jom (https://wiki.qt.io/Jom) is an NMake-compatible build tool. Dependency files for NMake/Jom need to use double-quotes to wrap filespecs containing special characters, instead of the backslash escapes that GNU Make wants. Adds the -MV option, which specifies to use double-quotes as needed instead of backslash escapes when writing the dependency file. Differential Revision: http://reviews.llvm.org/D9260 llvm-svn: 235903
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index da1a088097e..2a80b07beec 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -661,6 +661,8 @@ static void ParseDependencyOutputArgs(DependencyOutputOptions &Opts,
Opts.DOTOutputFile = Args.getLastArgValue(OPT_dependency_dot);
Opts.ModuleDependencyOutputDir =
Args.getLastArgValue(OPT_module_dependency_dir);
+ if (Args.hasArg(OPT_MV))
+ Opts.OutputFormat = DependencyOutputFormat::NMake;
}
bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
OpenPOWER on IntegriCloud