[staging-next] Darwin stdenvBootstrap fixes 2025-10#448523
[staging-next] Darwin stdenvBootstrap fixes 2025-10#448523vcunat merged 2 commits intoNixOS:staging-nextfrom
Conversation
Fix this config name for consistency with non-bootstrap platform config. This also fixes a build failure of the bootstrap tools on aarch64-darwin, where a test in LLVM 21 assumes it's spelt arm64, not aarch64. Also saves on having to rebuild LLVM just for bootstrap tools, now that the config is consistent.
cd13af0 to
8bfd3c8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Since NixOS#420382, we set an absolute default CLANG_RESOURCE_DIR for LLVM versions >= 21, which breaks the bootstrap tools because the absolute path was removed by nuke-ref while building and isn't there while bootstrapping. Pass -resource-dir explicitly while testing Clang to make it work.
8bfd3c8 to
b0ff7e6
Compare
| @@ -22,7 +22,7 @@ | |||
| supportedSystems ? builtins.fromJSON (builtins.readFile ../../ci/supportedSystems.json), | |||
| # The platform triples for which we build bootstrap tools. | |||
| bootstrapConfigs ? [ | |||
| "aarch64-apple-darwin" | |||
| "arm64-apple-darwin" | |||
There was a problem hiding this comment.
has the triple we use for aarch64 darwin been inconsistent between pkgs vs bootstrap for ages? :c
aarch64-darwin's pkgs.hostPlatform.config does give arm64-apple-darwin
There was a problem hiding this comment.
Yes. This has finally come to bite us.
There was a problem hiding this comment.
So I've ended up centralizing what we know here #444862 (comment)
There was a problem hiding this comment.
It seems like we're using darwinArch to turn aarch64 -> arm64 in some places, maybe we can clean those up in a followup if they were only needed due to this inconsistency.
darwinArch = cpu: if cpu.name == "aarch64" then "arm64" else cpu.name;|
cc @reckenrode: This will require fixes in darwin bootstrap next time the bootstrap tarballs are refreshed. Unfortunately I have no idea how. |
|
Thanks. I think we'd better unblock now on Hydra. But feel free to improve further, anyone. |
…ple-darwin Follow-up to NixOS#448523
Note: I haven't tested these.Also, I don't know what needs to be done for the--resource-dirthing to not run into it while bootstrapping Darwin stdenv next time.For the
{aarch64 => arm64}-apple-darwinrename, it seems to avoid rebuilding LLVM at all, which looks promising.I haven't tested the--resource-dirthing at all.Edit:
stdenvBootstrapTools.{x86_64,arm64}-apple-darwin.{build,test}worksThings done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.