summaryrefslogtreecommitdiffstats
path: root/src/build.cc
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-08 13:14:58 (GMT)
committerBrad King <brad.king@kitware.com>2018-11-19 15:23:51 (GMT)
commit8a9edb110354d5468ab42685cfece6a073146f27 (patch)
treeffe78231c4bdc8ad7e3a277a2b6b4f1822f5de0a /src/build.cc
parent4a4f9d40e178a9a9e88f4cd502d2be49bf7938d8 (diff)
downloadNinja-8a9edb110354d5468ab42685cfece6a073146f27.zip
Ninja-8a9edb110354d5468ab42685cfece6a073146f27.tar.gz
Ninja-8a9edb110354d5468ab42685cfece6a073146f27.tar.bz2
Restore depfile toleration of multiple output paths on distinct lines
Prior to introduction of depfile parser handling of multiple rules, ninja silently accepted a depfile of the form: out: in1 in2 in3 other: otherIn1 otherIn2 otherIn3 and incorrectly treated `other` and `otherIn*` as additional inputs to `out`. Now we prefer to reject this just as we already do for a depfile specifying multiple outputs on one line. However, this can break existing cases where such a depfile was silently tolerated. Add a `-w depfilemulti={err,warn}` option to control this behavior, and make it just a warning by default.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/build.cc b/src/build.cc
index ed219fd..b392803 100644
--- a/src/build.cc
+++ b/src/build.cc
@@ -557,7 +557,8 @@ Builder::Builder(State* state, const BuildConfig& config,
BuildLog* build_log, DepsLog* deps_log,
DiskInterface* disk_interface)
: state_(state), config_(config), disk_interface_(disk_interface),
- scan_(state, build_log, deps_log, disk_interface) {
+ scan_(state, build_log, deps_log, disk_interface,
+ &config_.depfile_parser_options) {
status_ = new BuildStatus(config);
}
@@ -906,7 +907,7 @@ bool Builder::ExtractDeps(CommandRunner::Result* result,
if (content.empty())
return true;
- DepfileParser deps;
+ DepfileParser deps(config_.depfile_parser_options);
if (!deps.Parse(&content, err))
return false;