diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-24 17:00:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-24 17:00:27 +0200 |
commit | 234869bfab747a373ac8815fc567957a8b05237e (patch) | |
tree | c0aa07a14964508846dace536814c1a0b680832c /libbuild2/cc | |
parent | 4277226e4b0abea10ff38abdd34636c483a59329 (diff) |
Fix bug in attempt to allow calling cc module functions during match
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/functions.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/cc/functions.cxx b/libbuild2/cc/functions.cxx index 9c06f87..abfd32f 100644 --- a/libbuild2/cc/functions.cxx +++ b/libbuild2/cc/functions.cxx @@ -51,7 +51,7 @@ namespace build2 // recipe with dynamic dependency extraction (depdb-dyndep) executes its // depdb preamble during match (after matching all the prerequisites). // - if (bs->ctx.phase != run_phase::match || + if (bs->ctx.phase != run_phase::match && bs->ctx.phase != run_phase::execute) fail << f.name << " can only be called during execution"; @@ -107,7 +107,7 @@ namespace build2 if (rs == nullptr) fail << f.name << " called out of project"; - if (bs->ctx.phase != run_phase::match || // See above. + if (bs->ctx.phase != run_phase::match && // See above. bs->ctx.phase != run_phase::execute) fail << f.name << " can only be called during execution"; |