From 65f77bb9a9556033a0bfb7401dd9a00120e27524 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Nov 2021 13:41:23 +0200 Subject: Do not apply install scope to update-for-install pre-operation --- libbuild2/install/rule.cxx | 4 ++-- libbuild2/install/utility.hxx | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'libbuild2/install') diff --git a/libbuild2/install/rule.cxx b/libbuild2/install/rule.cxx index 2d81067..d4c70c0 100644 --- a/libbuild2/install/rule.cxx +++ b/libbuild2/install/rule.cxx @@ -105,7 +105,7 @@ namespace build2 // iterates over all its members. // if (!is) - is = install_scope (t); + is = a.operation () != update_id ? install_scope (t) : nullptr; const target* pt (filter (*is, a, t, i)); if (pt == nullptr) @@ -366,7 +366,7 @@ namespace build2 // iterates over all its members. // if (!is) - is = install_scope (t); + is = a.operation () != update_id ? install_scope (t) : nullptr; const target* pt (filter (*is, a, t, i)); diff --git a/libbuild2/install/utility.hxx b/libbuild2/install/utility.hxx index cc5cd53..52b9a54 100644 --- a/libbuild2/install/utility.hxx +++ b/libbuild2/install/utility.hxx @@ -61,6 +61,10 @@ namespace build2 // belong to projects outside of this scope. If it's NULL, install // prerequisites from all projects. See also config.install.scope. // + // Note that this should not apply to update-for-install. Failed that we + // may end up using incompatibly-built prerequisites (e.g., a library) in + // a target built for install (e.g., an executable). + // LIBBUILD2_SYMEXPORT const scope* install_scope (const target&); -- cgit v1.1