From db6c4ac47601c88984822e1e7b5f4b9044dd6d81 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Sat, 20 Mar 2021 15:18:53 +0100 Subject: Remove `-w dupbuild` from error message and help output This is step 4 on #931. --- src/manifest_parser.cc | 11 +++++------ src/manifest_parser_test.cc | 5 ++--- src/ninja.cc | 1 - 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/manifest_parser.cc b/src/manifest_parser.cc index 54ad3f4..f77109f 100644 --- a/src/manifest_parser.cc +++ b/src/manifest_parser.cc @@ -323,15 +323,14 @@ bool ManifestParser::ParseEdge(string* err) { return lexer_.Error(path_err, err); if (!state_->AddOut(edge, path, slash_bits)) { if (options_.dupe_edge_action_ == kDupeEdgeActionError) { - lexer_.Error("multiple rules generate " + path + " [-w dupbuild=err]", - err); + lexer_.Error("multiple rules generate " + path, err); return false; } else { if (!quiet_) { - Warning("multiple rules generate %s. " - "builds involving this target will not be correct; " - "continuing anyway [-w dupbuild=warn]", - path.c_str()); + Warning( + "multiple rules generate %s. builds involving this target will " + "not be correct; continuing anyway", + path.c_str()); } if (e - i <= static_cast(implicit_outs)) --implicit_outs; diff --git a/src/manifest_parser_test.cc b/src/manifest_parser_test.cc index ec2eeed..5b0eddf 100644 --- a/src/manifest_parser_test.cc +++ b/src/manifest_parser_test.cc @@ -365,7 +365,7 @@ TEST_F(ParserTest, DuplicateEdgeWithMultipleOutputsError) { ManifestParser parser(&state, &fs_, parser_opts); string err; EXPECT_FALSE(parser.ParseTest(kInput, &err)); - EXPECT_EQ("input:5: multiple rules generate out1 [-w dupbuild=err]\n", err); + EXPECT_EQ("input:5: multiple rules generate out1\n", err); } TEST_F(ParserTest, DuplicateEdgeInIncludedFile) { @@ -382,8 +382,7 @@ TEST_F(ParserTest, DuplicateEdgeInIncludedFile) { ManifestParser parser(&state, &fs_, parser_opts); string err; EXPECT_FALSE(parser.ParseTest(kInput, &err)); - EXPECT_EQ("sub.ninja:5: multiple rules generate out1 [-w dupbuild=err]\n", - err); + EXPECT_EQ("sub.ninja:5: multiple rules generate out1\n", err); } TEST_F(ParserTest, PhonySelfReferenceIgnored) { diff --git a/src/ninja.cc b/src/ninja.cc index 45fc8ea..1cff6e8 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -1104,7 +1104,6 @@ bool DebugEnable(const string& name) { bool WarningEnable(const string& name, Options* options) { if (name == "list") { printf("warning flags:\n" -" dupbuild={err,warn} multiple build lines for one target\n" " phonycycle={err,warn} phony build statement references itself\n" ); return false; -- cgit v0.12