From 30da2a90b3d433160c06643fb7ca51722fbae6b8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 20 Apr 2021 15:36:02 +0200 Subject: Detect environment changes in ad hoc recipes --- libbuild2/bin/init.cxx | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'libbuild2/bin') diff --git a/libbuild2/bin/init.cxx b/libbuild2/bin/init.cxx index 62c7bcf..7e022fd8 100644 --- a/libbuild2/bin/init.cxx +++ b/libbuild2/bin/init.cxx @@ -724,8 +724,11 @@ namespace build2 } } - rs.assign ("bin.ar.path") = - process_path_ex (ari.ar_path, "ar", ari.ar_checksum); + rs.assign ("bin.ar.path") = process_path_ex ( + ari.ar_path, + "ar", + ari.ar_checksum, + hash_environment (ari.ar_environment)); rs.assign ("bin.ar.id") = ari.ar_id; rs.assign ("bin.ar.signature") = ari.ar_signature; rs.assign ("bin.ar.checksum") = ari.ar_checksum; @@ -744,8 +747,11 @@ namespace build2 if (ranlib != nullptr) { - rs.assign ("bin.ranlib.path") = - process_path_ex (ari.ranlib_path, "ranlib", ari.ranlib_checksum); + rs.assign ("bin.ranlib.path") = process_path_ex ( + ari.ranlib_path, + "ranlib", + ari.ranlib_checksum, + hash_environment (ari.ranlib_environment)); rs.assign ("bin.ranlib.id") = ari.ranlib_id; rs.assign ("bin.ranlib.signature") = ari.ranlib_signature; rs.assign ("bin.ranlib.checksum") = ari.ranlib_checksum; @@ -859,8 +865,11 @@ namespace build2 << " checksum " << ldi.checksum; } - rs.assign ("bin.ld.path") = - process_path_ex (ldi.path, "ld", ldi.checksum); + rs.assign ("bin.ld.path") = process_path_ex ( + ldi.path, + "ld", + ldi.checksum, + hash_environment (ldi.environment)); rs.assign ("bin.ld.id") = ldi.id; rs.assign ("bin.ld.signature") = ldi.signature; rs.assign ("bin.ld.checksum") = ldi.checksum; @@ -996,8 +1005,11 @@ namespace build2 << " checksum " << rci.checksum; } - rs.assign ("bin.rc.path") = - process_path_ex (rci.path, "rc", rci.checksum); + rs.assign ("bin.rc.path") = process_path_ex ( + rci.path, + "rc", + rci.checksum, + hash_environment (rci.environment)); rs.assign ("bin.rc.id") = rci.id; rs.assign ("bin.rc.signature") = rci.signature; rs.assign ("bin.rc.checksum") = rci.checksum; -- cgit v1.1