[Backport release-23.11] stdenv Rust fixes#269615
Merged
emilylange merged 2 commits intorelease-23.11from Nov 24, 2023
Merged
Conversation
Usually, attributes passed explicitly to elaborate take precedence
over the elaborated ones, but since we also elaborate the nested
"rust" attrset, we need to push that one level down, so the rest of
"rust" is still filled in if you just pass
{ rust = { config = ... } }.
I've had to drop the assertion that checked that at most one of "rust"
and "rustc" was part of the un-elaborated system, because doing this
broke passing an elaborated system in, which should be idempotent.
For the same reason, I've also had to make it possible for
rust.rustcTargetSpec to be passed in. Otherwise, on the second call,
since platform was filled in by the first, the custom target file
would be constructed. The only other way to avoid this would be to
compare the platform attrs to all built in Rust targets to check it
wasn't one of those, and that isn't feasible.
Fixes: e3e57b8 ("lib.systems: elaborate Rust metadata")
(cherry picked from commit 886c892)
The previous version stopped working when we started elaborating Rust metadata. Here, I've made it a bit nicer by actually setting targetPlatform to an elaborated system. Setting the config to wasi to get elaborate to understand it is a bit of a hack, but I think it's less of a hack than what we had before. The only actual difference this makes to the rustc-wasm32 derivation compared to the previous working version, is that now crt-static is set. This is probably the right thing anyway. Fixes: e3e57b8 ("lib.systems: elaborate Rust metadata") (cherry picked from commit a578479)
Merged
13 tasks
Member
|
Result of 2 packages blacklisted:
6 packages built:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bot-based backport to
release-23.11, triggered by a label in #268168.