diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-04-22 00:55:10 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-04-22 00:56:43 (GMT) |
commit | a83020b750e7b3c8c801fcf79ebe94d7dd4840dd (patch) | |
tree | f5ec3fc917cd9ae39935c93edaafdef67ea721a0 /src/build.cc | |
parent | c57fd1a903cb342dc414307088352cdb550d3641 (diff) | |
download | Ninja-a83020b750e7b3c8c801fcf79ebe94d7dd4840dd.zip Ninja-a83020b750e7b3c8c801fcf79ebe94d7dd4840dd.tar.gz Ninja-a83020b750e7b3c8c801fcf79ebe94d7dd4840dd.tar.bz2 |
Don't record deps in dry runs.
deps_log() is NULL during dry runs, so this fixes a crash. It also
matches ninja 1.2.0's behavior as far as I can tell.
Fixes issue #551.
Diffstat (limited to 'src/build.cc')
-rw-r--r-- | src/build.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build.cc b/src/build.cc index fed3065..c9842ce 100644 --- a/src/build.cc +++ b/src/build.cc @@ -715,7 +715,9 @@ void Builder::FinishCommand(CommandRunner::Result* result) { // extraction itself can fail, which makes the command fail from a // build perspective. vector<Node*> deps_nodes; - string deps_type = edge->GetBinding("deps"); + string deps_type; + if (!config_.dry_run) + deps_type = edge->GetBinding("deps"); if (!deps_type.empty()) { string extract_err; if (!ExtractDeps(result, deps_type, &deps_nodes, &extract_err) && |