Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkgs/stdenv/darwin/bootstrap-files/aarch64-apple-darwin.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# FIXME: Changed to arm64-apple-darwin in release.nix stdenvBootstrapTools, please handle when refreshing

# Autogenerated by maintainers/scripts/bootstrap-files/refresh-tarballs.bash as:
# $ ./refresh-tarballs.bash --targets=aarch64-apple-darwin
#
Expand Down
5 changes: 3 additions & 2 deletions pkgs/stdenv/darwin/test-bootstrap-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ builtins.derivation {
# The stdenv bootstrap builds the SDK in the bootstrap. Use an existing SDK to test the tools.
export SDKROOT='${apple-sdk.sdkroot}'

export flags="-idirafter $SDKROOT/usr/include --sysroot=$SDKROOT -L$SDKROOT/usr/lib -L$tools/lib -DTARGET_OS_IPHONE=0"
export resource_dir="$(echo "$tools"/lib/clang/*)" # Expand wildcard
export flags="-resource-dir=$resource_dir -idirafter $SDKROOT/usr/include --sysroot=$SDKROOT -L$SDKROOT/usr/lib -L$tools/lib -DTARGET_OS_IPHONE=0"

export CPP="clang -E $flags"
export CC="clang $flags"
Expand All @@ -77,7 +78,7 @@ builtins.derivation {
# using -Wl,-flat_namespace is required to generate an error
mkdir libtest/
ln -s $tools/lib/libc++.dylib libtest/
clang++ -Wl,-flat_namespace -idirafter $SDKROOT/usr/include -isystem$tools/include/c++/v1 \
clang++ -Wl,-flat_namespace -resource-dir=$resource_dir -idirafter $SDKROOT/usr/include -isystem$tools/include/c++/v1 \
--sysroot=$SDKROOT -L$SDKROOT/usr/lib -L./libtest -L$PWD/libSystem-boot hello3.cc

tar xvf ${hello.src}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Member

@LunNova LunNova Oct 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This has finally come to bite us.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I've ended up centralizing what we know here #444862 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

"aarch64-unknown-linux-gnu"
"aarch64-unknown-linux-musl"
"i686-unknown-linux-gnu"
Expand Down
Loading