Bug 1749607 - Only use bootstrapped pkgconf when using bootstrapped sysroot. r=firefox-build-system-reviewers,mhentges
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 17 Jan 2022 23:49:35 +0000
changeset 604737 1fa7169d33613187ad34302520976f3bc96fdd30
parent 604736 38a63dfc1a01df419f07a91663be73e11ae48d8a
child 604738 01bf494cd0aeabb6c6c89197fe35a17d26315aa9
push id39157
push userctuns@mozilla.com
push dateTue, 18 Jan 2022 03:56:20 +0000
treeherdermozilla-central@1fa7169d3361 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, mhentges
bugs1749607
milestone98.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1749607 - Only use bootstrapped pkgconf when using bootstrapped sysroot. r=firefox-build-system-reviewers,mhentges Differential Revision: https://phabricator.services.mozilla.com/D135978
build/moz.configure/bootstrap.configure
build/moz.configure/pkg.configure
--- a/build/moz.configure/bootstrap.configure
+++ b/build/moz.configure/bootstrap.configure
@@ -123,16 +123,18 @@ def bootstrap_path(path, **kwargs):
     @imports("os")
     @imports("subprocess")
     @imports("sys")
     @imports(_from="mozbuild.util", _import="ensureParentDir")
     @imports(_from="importlib", _import="import_module")
     @imports(_from="__builtin__", _import="open")
     @imports(_from="__builtin__", _import="Exception")
     def bootstrap_path(bootstrap, toolchains_base_dir, tasks, build_env, path):
+        if not path:
+            return
         path_parts = path.split("/")
 
         def try_bootstrap(exists):
             if not tasks:
                 return False
             prefixes = [""]
             if tasks.prefix:
                 prefixes.insert(0, "{}-".format(tasks.prefix))
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -8,17 +8,17 @@
 @depends(toolchain_prefix, when=compile_environment)
 def pkg_config(prefixes):
     return tuple("{}pkg-config".format(p) for p in (prefixes or ()) + ("",))
 
 
 pkg_config = check_prog(
     "PKG_CONFIG",
     pkg_config,
-    bootstrap="pkgconf",
+    bootstrap=depends(when=target_sysroot.bootstrapped)(lambda: "pkgconf"),
     allow_missing=True,
     when=compile_environment
     & depends(target.os)(lambda os: os not in ("WINNT", "OSX", "Android")),
 )
 
 
 @depends_if(pkg_config)
 @checking("for pkg-config version")