Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding system root via environment #82

Merged
merged 2 commits into from
Sep 4, 2020

Commits on Sep 4, 2020

  1. Allow overriding system root via environment

    Use the PKG_CONFIG_SYSROOT_DIR (preferred) or SYSROOT (fallback)
    environment variables to override the default path used to determine
    whether a library is a system library or not (/usr).
    
    This enables cross-compilation scenarios where the system root is not a
    subdirectory of /usr. Specifically, when building Rust packages in the
    Chomium OS SDK, each board's sysroot is located in /build/$BOARD rather
    than a subdirectory of /usr. Additionally, cros_sdk only specifies
    SYSROOT (PKG_CONFIG_SYSROOT_DIR is set by the pkg-config-$BOARD cross
    compilation helpers, but that isn't available in pkg-config-rs).
    
    This has only been tested on Linux, as I don't have a macOS machine
    handy, but I believe the macOS path should work as before (it does not
    consider the new sysroot variables).
    
    Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
    danielverkamp authored and sdroege committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    81468be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e94a533 View commit details
    Browse the repository at this point in the history