From 234869bfab747a373ac8815fc567957a8b05237e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Nov 2021 17:00:27 +0200 Subject: Fix bug in attempt to allow calling cc module functions during match --- libbuild2/cc/functions.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbuild2') 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"; -- cgit v1.1