build: macos fix
This commit is contained in:
parent
17545c1b7c
commit
0205e01b3c
1 changed files with 5 additions and 17 deletions
|
@ -29,24 +29,12 @@ rustup target add aarch64-apple-darwin
|
|||
|
||||
[[ $2 == "x86_64" ]] && arch+=(x86_64-apple-darwin)
|
||||
[[ $2 == "arm" ]] && arch+=(aarch64-apple-darwin)
|
||||
[[ $2 == "universal" ]]; arch+=(universal2-apple-darwin)
|
||||
|
||||
if [[ "$OSTYPE" != "darwin"* ]]; then
|
||||
rustup target add x86_64h-apple-darwin
|
||||
[[ $2 == "universal" ]] && arch+=(x86_64h-apple-darwin)
|
||||
else
|
||||
[[ $2 == "universal" ]] && arch+=(universal2-apple-darwin)
|
||||
rm -rf target/x86_64-apple-darwin
|
||||
rm -rf target/aarch64-apple-darwin
|
||||
fi
|
||||
|
||||
# Start release build with zig linker on non-MacOS systems
|
||||
if [[ "$OSTYPE" != "darwin"* ]]; then
|
||||
# Start release build with zig linker, requires zig 0.12.1
|
||||
cargo install cargo-zigbuild
|
||||
cargo zigbuild --release --target ${arch}
|
||||
rm -rf .intentionally-empty-file.o
|
||||
else
|
||||
cargo build --release --target ${arch}
|
||||
fi
|
||||
|
||||
yes | cp -rf target/${arch}/release/grim macos/Grim.app/Contents/MacOS
|
||||
|
||||
|
|
Loading…
Reference in a new issue