mirror of
https://github.com/reactos/ninja.git
synced 2024-11-27 13:40:30 +00:00
add -d keeprsp to preserve @rsp files on success on windows
This commit is contained in:
parent
e36590b781
commit
cc89c1aaec
@ -263,12 +263,12 @@ n.comment('Core source files all build into ninja library.')
|
||||
for name in ['build',
|
||||
'build_log',
|
||||
'clean',
|
||||
'debug_flags',
|
||||
'depfile_parser',
|
||||
'deps_log',
|
||||
'disk_interface',
|
||||
'edit_distance',
|
||||
'eval_env',
|
||||
'explain',
|
||||
'graph',
|
||||
'graphviz',
|
||||
'lexer',
|
||||
|
@ -25,6 +25,7 @@
|
||||
#endif
|
||||
|
||||
#include "build_log.h"
|
||||
#include "debug_flags.h"
|
||||
#include "depfile_parser.h"
|
||||
#include "deps_log.h"
|
||||
#include "disk_interface.h"
|
||||
@ -776,7 +777,7 @@ bool Builder::FinishCommand(CommandRunner::Result* result, string* err) {
|
||||
|
||||
// Delete any left over response file.
|
||||
string rspfile = edge->GetBinding("rspfile");
|
||||
if (!rspfile.empty())
|
||||
if (!rspfile.empty() && !g_keep_rsp)
|
||||
disk_interface_->RemoveFile(rspfile);
|
||||
|
||||
if (scan_.build_log()) {
|
||||
|
@ -13,3 +13,5 @@
|
||||
// limitations under the License.
|
||||
|
||||
bool g_explaining = false;
|
||||
|
||||
bool g_keep_rsp = false;
|
@ -24,4 +24,6 @@
|
||||
|
||||
extern bool g_explaining;
|
||||
|
||||
extern bool g_keep_rsp;
|
||||
|
||||
#endif // NINJA_EXPLAIN_H_
|
@ -18,10 +18,10 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "build_log.h"
|
||||
#include "debug_flags.h"
|
||||
#include "depfile_parser.h"
|
||||
#include "deps_log.h"
|
||||
#include "disk_interface.h"
|
||||
#include "explain.h"
|
||||
#include "manifest_parser.h"
|
||||
#include "metrics.h"
|
||||
#include "state.h"
|
||||
|
@ -32,8 +32,8 @@
|
||||
#include "build_log.h"
|
||||
#include "deps_log.h"
|
||||
#include "clean.h"
|
||||
#include "debug_flags.h"
|
||||
#include "disk_interface.h"
|
||||
#include "explain.h"
|
||||
#include "graph.h"
|
||||
#include "graphviz.h"
|
||||
#include "manifest_parser.h"
|
||||
@ -747,6 +747,7 @@ bool DebugEnable(const string& name) {
|
||||
printf("debugging modes:\n"
|
||||
" stats print operation counts/timing info\n"
|
||||
" explain explain what caused a command to execute\n"
|
||||
" keeprsp don't delete @response files on success\n"
|
||||
"multiple modes can be enabled via -d FOO -d BAR\n");
|
||||
return false;
|
||||
} else if (name == "stats") {
|
||||
@ -755,6 +756,9 @@ bool DebugEnable(const string& name) {
|
||||
} else if (name == "explain") {
|
||||
g_explaining = true;
|
||||
return true;
|
||||
} else if (name == "keeprsp") {
|
||||
g_keep_rsp = true;
|
||||
return true;
|
||||
} else {
|
||||
const char* suggestion =
|
||||
SpellcheckString(name.c_str(), "stats", "explain", NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user