-
Notifications
You must be signed in to change notification settings - Fork 400
feat: [NODE-1566] Build with hermetic cc toolchains #3508
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
02f7a03
use hermetic toolchains
nmattia dfceca5
Fix infogetty
Bownairo d963bd3
Fix wasm!
Bownairo 148e7f0
Fix libfuzzer!
Bownairo dd9503c
Fix hs
Bownairo 19166e3
Fix AFL fuzzers
Bownairo 68c6a4b
Fix openssl libs
Bownairo d1d66b6
Fix stripping
Bownairo 4e03ca6
Remove ZIG_LINK_ARGS
Bownairo 899353f
Automatically updated Cargo*.lock
c10f626
Small cleanups and comments
Bownairo 5ea2fd4
Simplify openssl references
Bownairo 86e120d
Automatically updated Cargo*.lock
4846271
Switch to `archive_override`
Bownairo 05b9e94
Add macOS toolchains
Bownairo d3e4c9b
Strip binary within target
Bownairo 1b6ea6c
Rename hs targets
Bownairo 3f99df8
Organize external libs into third_party
Bownairo 117b3a5
Update various comments
Bownairo 1b17512
Merge branch 'master' into eero/hermetic-toolchain
Bownairo e9ad1a5
Automatically updated Cargo*.lock
e594a01
Buildifier
Bownairo 12ba397
Disable hermetic toolchains for macOS
Bownairo 5ab38a7
Disable tmp speedup for zig
Bownairo f2d0847
Wrap rules_haskell defs at a lower level
Bownairo 9d33dfc
Merge branch 'master' into eero/hermetic-toolchain
Bownairo 33f03b0
Fix release stripping
Bownairo 7fec839
Fix release stripping for macOS
Bownairo 356cb8f
Drop lockfiles
Bownairo 9016c4a
Merge branch 'master' into eero/hermetic-toolchain
Bownairo 57fbca4
Automatically updated Cargo*.lock
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
|
Bownairo marked this conversation as resolved.
|
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Adjust target naming to match what zig expects. | ||
|
nmattia marked this conversation as resolved.
|
||
| # | ||
| # zig does not plan to change their target naming: https://github.com/ziglang/zig/issues/4911 | ||
| # and cc-rs is waiting on a 1.0 release to support zig's scheme: https://github.com/rust-lang/cc-rs/pull/986 | ||
| # Other related links: https://github.com/bazelbuild/rules_rust/issues/2529 | ||
| # https://github.com/Asana/cc-rs | ||
| diff --git a/src/lib.rs b/src/lib.rs | ||
| index f75b951..8e770a7 100644 | ||
| --- a/src/lib.rs | ||
| +++ b/src/lib.rs | ||
| @@ -2091,6 +2091,12 @@ impl Build { | ||
| target.versioned_llvm_target(None) | ||
| }; | ||
|
|
||
| + let llvm_target = match llvm_target.clone() { | ||
| + std::borrow::Cow::Borrowed("x86_64-unknown-linux-gnu") => "x86_64-linux-gnu", | ||
| + std::borrow::Cow::Borrowed("wasm32-unknown-unknown") => "wasm32-freestanding-musl", | ||
| + _other => &llvm_target, | ||
| + }; | ||
| + | ||
| // Pass `--target` with the LLVM target to properly | ||
| // configure Clang even when cross-compiling. | ||
| cmd.push_cc_arg(format!("--target={llvm_target}").into()); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.