fix pkgsMusl.cargo via cargoSetupHook#198311
fix pkgsMusl.cargo via cargoSetupHook#198311yu-re-ka merged 2 commits intoNixOS:stagingfrom yu-re-ka:musl-cargo
Conversation
There was a problem hiding this comment.
Do we need to specify the triple here, or can we just do [host]?
There was a problem hiding this comment.
I think both work, do you prefer just [host]?
There was a problem hiding this comment.
I'd have a mild preference for the former, just because it means we don't have to worry about what happens if e.g. using a custom build spec. But I don't think it's too important, and would understand if you wanted it to be consistent with what we were already doing for target.
There was a problem hiding this comment.
Might make sense to rename this, and probably expand the comment a bit to explain what's going on? You could probably just adapt what I wrote in the other PR if you want.
There was a problem hiding this comment.
done, please let me know if the comment is ok
|
are -Z flags allowed without RUSTC_BOOTSTRAP=1 ? |
The way we set it, in |
|
|
||
| [unstable] | ||
| host-config = true | ||
| target-applies-to-host = true |
There was a problem hiding this comment.
I'm very puzzled as to why you set target-applies-to-host to true: the doc says
It requires the -Zhost-config and -Ztarget-applies-to-host command-line options to be set, and that target-applies-to-host = false is set in the Cargo configuration file.
https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#host-config
There was a problem hiding this comment.
There is two things here:
- Is the target-applies-to-host unstable feature enabled?
- If yes, this unlocks a new target-applies-to-host option
Also see, in the same section:
Setting -Zhost-config changes the default for target-applies-to-host to false from true.
There was a problem hiding this comment.
ok I understand. Then the change looks sensible to me, and if things build with it then go for it.
There was a problem hiding this comment.
I like this better than my approach, and in my testing, all the builds my version fixed are also fixed by this change.
It's still an open question what to do for rustc on Musl when used outside of Cargo, but that's orthogonal to this change. For Cargo this is the way to go.
|
This PR seems to have regressed packages being able to set |
|
Ah, it's actually specifically the unstable.* options that cause this. Nevertheless, this causes some breakage of project cargo config files. |
Description of changes
This is a variant of #190796, which removes the need for patching rustc by always applying the unstable host-config flag in cargoSetupHook.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes