summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-04-05 18:48:35 (GMT)
committerNico Weber <nicolasweber@gmx.de>2018-04-05 18:48:35 (GMT)
commit42eefc854b32b3c1efc27548baaacdebad199853 (patch)
tree11225b3136862a267f6ce0ad0aef66e156fe12f3 /src
parente85f5ac86be249e6472b368ee7abbe98fe01bcd2 (diff)
downloadNinja-42eefc854b32b3c1efc27548baaacdebad199853.zip
Ninja-42eefc854b32b3c1efc27548baaacdebad199853.tar.gz
Ninja-42eefc854b32b3c1efc27548baaacdebad199853.tar.bz2
make `-w dupbuild` default to `err`
You can still opt out of this by passing `-w dupbuild=warn`. But if you're getting this diagnostic, your build files are incorrect and you should ideally just fix them. This is step 3 on https://github.com/ninja-build/ninja/issues/931 I sent an RfC to ninja-build a few months ago; nobody objected.
Diffstat (limited to 'src')
-rw-r--r--src/ninja.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ninja.cc b/src/ninja.cc
index f4246d6..f9efc77 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -1184,6 +1184,7 @@ NORETURN void real_main(int argc, char** argv) {
BuildConfig config;
Options options = {};
options.input_file = "build.ninja";
+ options.dupe_edges_should_err = true;
setvbuf(stdout, NULL, _IOLBF, BUFSIZ);
const char* ninja_command = argv[0];