pkg-config: dump all PKG_CONFIG environment variables to simplify debugging

With this change, all the system's built-in pkg-config environment variables
are outputted as well, to simplify debugging.
pull/8432/head
Jeff Moguillansky 4 years ago committed by Dylan Baker
parent 6a9a1557e4
commit 0047f7439c
  1. 6
      mesonbuild/dependencies/base.py

@ -676,14 +676,16 @@ class PkgConfigDependency(ExternalDependency):
if sysroot: if sysroot:
env['PKG_CONFIG_SYSROOT_DIR'] = sysroot env['PKG_CONFIG_SYSROOT_DIR'] = sysroot
new_pkg_config_path = ':'.join([p for p in extra_paths]) new_pkg_config_path = ':'.join([p for p in extra_paths])
mlog.debug('PKG_CONFIG_PATH: ' + new_pkg_config_path)
env['PKG_CONFIG_PATH'] = new_pkg_config_path env['PKG_CONFIG_PATH'] = new_pkg_config_path
pkg_config_libdir_prop = environment.properties[for_machine].get_pkg_config_libdir() pkg_config_libdir_prop = environment.properties[for_machine].get_pkg_config_libdir()
if pkg_config_libdir_prop: if pkg_config_libdir_prop:
new_pkg_config_libdir = ':'.join([p for p in pkg_config_libdir_prop]) new_pkg_config_libdir = ':'.join([p for p in pkg_config_libdir_prop])
env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir
mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir) # Dump all PKG_CONFIG environment variables
for key, value in env.items():
if key.startswith('PKG_'):
mlog.debug(f'env[{key}]: {value}')
def _call_pkgbin(self, args, env=None): def _call_pkgbin(self, args, env=None):
# Always copy the environment since we're going to modify it # Always copy the environment since we're going to modify it

Loading…
Cancel
Save