-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crate_universe: Allow platform-specific build script env vars (#2139)
My use-case here is needing to point at different paths for libclang.so when using bindgen on different platforms. This allows specifying build script env vars in annotations like: ```starlark build_script_env = { "BORING_BSSL_PATH": "$(execpath @//third_party/boringssl:gen_dir)", "LIBCLANG_PATH": { "x86_64-unknown-linux-gnu": "$(execpath @libclang_linux_x86_64//file:libclang.so)", }, }, ``` which will unconditionally set `$BORING_BSSL_PATH`, but will only set `$LIBCLANG_PATH` on x86-64 Linux. We could in theory support this kind of construct for all annotation fields, but I've only added it where I happened to need it for now.
- Loading branch information
1 parent
b55575e
commit feb75f1
Showing
4 changed files
with
276 additions
and
33 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
Oops, something went wrong.