zig std args: apply -fno-rosetta on macs with arm

This commit is contained in:
botantony 2025-02-21 19:10:41 +01:00
parent c5d78f3347
commit 68f8798821
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6

View File

@ -41,9 +41,7 @@ module OS
}
def std_zig_args(prefix: self.prefix, release_mode: :fast)
args = super
# it is probably better to add this flag only on arm macs
# my attempts with `MacOS::Hardware::CPU.arm?` and its variations didn't work out
args << "-fno-rosetta"
args << "-fno-rosetta" if ::Hardware::CPU.arm?
args
end
end