-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assorted cargo build script fixes (#422)
* Rustfmt * Derive CARGO_CFG env vars from rustc This is what Cargo does - it means we'll automatically populate all (most) of the values cargo would. This fixes up a couple of things: 1. CARGO_CFG_TARGET_OS mismatches - Rustc treats macos as "macos" whereas the current code derives "darwin" from the target triple. 2. This sets additional env vars, such as CARGO_CFG_TARGET_ENV, CARGO_CFG_TARGET_FAMILY, etc. * Do exec_root replacement on rustc env vars Some crates, such as typenum, set rustc env vars to the paths where they generated output in $OUT_DIR, and use things like: ```rust include!(env!(...)) ``` to read them. This supports that use-case.
- Loading branch information
1 parent
169476f
commit e64700d
Showing
3 changed files
with
96 additions
and
30 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
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
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