Bug 1519308 - Try toolchain-prefixed pkg-config. r=froydnj
☠☠ backed out by c45da646fc61 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 11 Jan 2019 15:54:51 +0000
changeset 453589 24243f13c895724b1962d7d5e0054e097a579475
parent 453588 c41c32486c7e5190e15fa50200de311a90f86b9e
child 453590 487a0df75166e4bd2a4cc29d6a6e20c49997f1e9
push id75926
push usermh@glandium.org
push dateFri, 11 Jan 2019 22:26:33 +0000
treeherderautoland@24243f13c895 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1519308
milestone66.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 1519308 - Try toolchain-prefixed pkg-config. r=froydnj When doing cross-compiles for Desktop, system pkg-config is going to be looking for .pc files for the host, but systems setup for cross-compiles come with a toolchain-prefixed pkg-config, which we should be looking for. Differential Revision: https://phabricator.services.mozilla.com/D16318
build/moz.configure/pkg.configure
moz.configure
--- a/build/moz.configure/pkg.configure
+++ b/build/moz.configure/pkg.configure
@@ -1,19 +1,19 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 
-@depends('--enable-compile-environment')
-def pkg_config(compile_env):
-    if compile_env:
-        return ('pkg-config',)
+@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, allow_missing=True)
 
 
 @depends_if(pkg_config)
 @checking('for pkg-config version')
 @imports('subprocess')
--- a/moz.configure
+++ b/moz.configure
@@ -118,23 +118,24 @@ def debug_rust():
 
 set_config('MOZ_DEBUG_RUST', debug_rust)
 set_define('MOZ_DEBUG_RUST', debug_rust)
 
 js_option(env='MOZ_PGO', help='Build with profile guided optimizations')
 
 set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
 
+include('build/moz.configure/toolchain.configure',
+        when='--enable-compile-environment')
+
 include('build/moz.configure/pkg.configure')
 # Make this assignment here rather than in pkg.configure to avoid
 # requiring this file in unit tests.
 add_old_configure_assignment('PKG_CONFIG', pkg_config)
 
-include('build/moz.configure/toolchain.configure',
-        when='--enable-compile-environment')
 include('build/moz.configure/memory.configure',
         when='--enable-compile-environment')
 include('build/moz.configure/headers.configure',
         when='--enable-compile-environment')
 include('build/moz.configure/warnings.configure',
         when='--enable-compile-environment')
 include('build/moz.configure/flags.configure',
         when='--enable-compile-environment')