diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-04-07 18:01:20 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-04-07 18:01:20 +0000 |
commit | 529c03bc1ea8f447b8a1e6cd0b7b7e9742f6fd4f (patch) | |
tree | ec9cb01818dd94f5770db669a49ff1a557981991 /clang/lib/Driver/Tools.cpp | |
parent | 994c16833caf086dcdd6e8c26fb21aa4d950946f (diff) | |
download | bcm5719-llvm-529c03bc1ea8f447b8a1e6cd0b7b7e9742f6fd4f.tar.gz bcm5719-llvm-529c03bc1ea8f447b8a1e6cd0b7b7e9742f6fd4f.zip |
Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.
llvm-svn: 129082
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index e7228229ea2..77ff2a025f2 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1246,6 +1246,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_P); Args.AddLastArg(CmdArgs, options::OPT_print_ivar_layout); + if (D.CCLogDiagnostics) { + CmdArgs.push_back("-diagnostic-log-file"); + CmdArgs.push_back(D.CCLogDiagnosticsFilename ? + D.CCLogDiagnosticsFilename : "-"); + } + // Special case debug options to only pass -g to clang. This is // wrong. Args.ClaimAllArgs(options::OPT_g_Group); |