-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
070b4e9
commit 81468be
Showing
1 changed file
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters