summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser.cc
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2024-04-11 16:44:05 (GMT)
committerJan Niklas Hasse <jhasse@bixense.com>2024-04-11 16:44:05 (GMT)
commit65d0dfcbbea6b8ca7d8a3a0f673ecb522379e43c (patch)
tree7b30fc5f0a477efd075ab0f8eead78aa7554869b /src/manifest_parser.cc
parent448ae1ccacd17025457ace965d78a45a113c70c6 (diff)
parent1dcebc6399dc76a9bdf643ad9722d7f2d7fee51c (diff)
downloadNinja-1.12.0.zip
Ninja-1.12.0.tar.gz
Ninja-1.12.0.tar.bz2
v1.12.0v1.12.0
Diffstat (limited to 'src/manifest_parser.cc')
-rw-r--r--src/manifest_parser.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/manifest_parser.cc b/src/manifest_parser.cc
index 8db6eb3..c4b2980 100644
--- a/src/manifest_parser.cc
+++ b/src/manifest_parser.cc
@@ -14,8 +14,10 @@
#include "manifest_parser.h"
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+
#include <vector>
#include "graph.h"
@@ -334,20 +336,9 @@ bool ManifestParser::ParseEdge(string* err) {
return lexer_.Error("empty path", err);
uint64_t slash_bits;
CanonicalizePath(&path, &slash_bits);
- if (!state_->AddOut(edge, path, slash_bits)) {
- if (options_.dupe_edge_action_ == kDupeEdgeActionError) {
- 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",
- path.c_str());
- }
- if (e - i <= static_cast<size_t>(implicit_outs))
- --implicit_outs;
- }
+ if (!state_->AddOut(edge, path, slash_bits, err)) {
+ lexer_.Error(std::string(*err), err);
+ return false;
}
}
@@ -416,6 +407,7 @@ bool ManifestParser::ParseEdge(string* err) {
if (dgi == edge->inputs_.end()) {
return lexer_.Error("dyndep '" + dyndep + "' is not an input", err);
}
+ assert(!edge->dyndep_->generated_by_dep_loader());
}
return true;