diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-02-02 22:41:48 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-02-02 22:41:48 +0000 |
commit | 68eb60b8c4ff9347b476fc3ddce329dcf851b382 (patch) | |
tree | c45933cc56fc632c6177c42c8c486dc752eaa1c0 /clang/lib/Driver/Tools.cpp | |
parent | d5c235dab8c6819d391e6a4e51657daeef2f212d (diff) | |
download | bcm5719-llvm-68eb60b8c4ff9347b476fc3ddce329dcf851b382.tar.gz bcm5719-llvm-68eb60b8c4ff9347b476fc3ddce329dcf851b382.zip |
PR 17421: Implemented -save-temps={obj|cwd} option
-save-temps=cwd is equivalent to -save-temps
-save-temps=obj saves temporary file in the same directory as output
This helps to avoid clobbering of temp files in case of parallel
compilation with -save-temps of the files that have the same name
but located in different directories.
Patch by Artem Belevich
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D7304
llvm-svn: 227886
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 35e3691ec26..9c89c521498 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4495,7 +4495,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // With -save-temps, we want to save the unoptimized bitcode output from the // CompileJobAction, so disable optimizations if they are not already // disabled. - if (Args.hasArg(options::OPT_save_temps) && !OptDisabled && + if (C.getDriver().isSaveTempsEnabled() && !OptDisabled && isa<CompileJobAction>(JA)) CmdArgs.push_back("-disable-llvm-optzns"); |