diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-03-10 09:58:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-03-10 09:58:46 +0200 |
commit | 7534c67799ba839593edd0ffa6339c86ce38e18f (patch) | |
tree | 55c5872e5da542388c717e13805fa55e408a59b2 | |
parent | 145589cf2b524b59a8ffa950882d3433e2885b7c (diff) |
Remove update variable from source of synthesized dependency
-rw-r--r-- | libbuild2/cc/link-rule.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libbuild2/cc/link-rule.cxx b/libbuild2/cc/link-rule.cxx index 97834fd..50c56a4 100644 --- a/libbuild2/cc/link-rule.cxx +++ b/libbuild2/cc/link-rule.cxx @@ -1589,7 +1589,20 @@ namespace build2 (!group || !rt.has_prerequisites ())) { prerequisites ps; - ps.push_back (p.as_prerequisite ()); // Source. + + // Add source. + // + // Remove the update variable (we may have stray update=execute + // that was specified together with the header). + // + { + prerequisite pc (p.as_prerequisite ()); + + if (!pc.vars.empty ()) + pc.vars.erase (*ctx.var_update); + + ps.push_back (move (pc)); + } // Add our lib*{} (see the export.* machinery for details) and // bmi*{} (both original and chained; see module search logic) |