summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-05 16:41:37 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-05-05 16:46:38 +0200
commitf249a220913f4421c58c9c6251e4f3dce67e251c (patch)
tree8e5b3017211e2815d265022c3f19e2db544e6bdf /src
parenta3d2803ebd12dd2741a249536752418faf7b0ec5 (diff)
downloadjustbuild-f249a220913f4421c58c9c6251e4f3dce67e251c.tar.gz
generic rule: fix conflict check
For a generic rule, it is an error if map union of various inputs (overlayed in correct order) does not form a proper stage. To implement this check properly, we first have to construct the map of all inputs and only then perform the staging check and not do the check with only the runfiles, as 5e104a526cf76fe75312d2fd288a3c88f506fb0a accidentally did. Fix this.
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/build_engine/target_map/built_in_rules.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/build_engine/target_map/built_in_rules.cpp b/src/buildtool/build_engine/target_map/built_in_rules.cpp
index c0015b29..1736f3c7 100644
--- a/src/buildtool/build_engine/target_map/built_in_rules.cpp
+++ b/src/buildtool/build_engine/target_map/built_in_rules.cpp
@@ -1455,10 +1455,10 @@ void GenericRuleWithDeps(
for (auto const& dep : dependency_values) {
inputs = ExpressionPtr{Expression::map_t{inputs, (*dep)->RunFiles()}};
}
- auto inputs_conflict = BuildMaps::Target::Utils::tree_conflict(inputs);
for (auto const& dep : dependency_values) {
inputs = ExpressionPtr{Expression::map_t{inputs, (*dep)->Artifacts()}};
}
+ auto inputs_conflict = BuildMaps::Target::Utils::tree_conflict(inputs);
// While syntactical conflicts are resolved in a latest wins (with artifacts
// after runfiles), semantic path conclicts are an error.
if (inputs_conflict) {