Skip to content

Commit

Permalink
platforms: use native arch parameters for apple-m1
Browse files Browse the repository at this point in the history
This should allow clang to better optimise for the only aarch64-darwin CPU µarch

Closes NixOS#166401
  • Loading branch information
Atemu committed Mar 31, 2022
1 parent ce8cbe3 commit 518ca7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/systems/platforms.nix
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,10 @@ rec {

apple-m1 = {
gcc = {
arch = "armv8.3-a+crypto+sha2+aes+crc+fp16+lse+simd+ras+rdm+rcpc";
# Extracted from `/usr/bin/clang -E - -mcpu=apple-m1 -###`
arch = "armv8.5a+fp-armv8+neon+crc+crypto+dotprod+fp16fml+ras+lse+rdm+rcpc+zcm+zcz+fullfp16+sm4+sha3+sha2+aes";
# Newest AppleSilicon CPU llvm11 knows about
# FIXME: Set to apple-m1 once llvm12 is default
cpu = "apple-a13";
};
};
Expand Down

0 comments on commit 518ca7a

Please sign in to comment.