Skip to content

Commit 9fa8270

Browse files
committed
Update release build script
Default binaries are now compiled for haswell or higher because using FMA instructions results in a noticeable performance gain.
1 parent 1f3957f commit 9fa8270

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

build_release.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#!/bin/sh
22

3-
# set rustflags as empty to make sure we’re not building for march=native,
4-
# as these are public release builds
5-
RUSTFLAGS="" cargo build --release --locked
3+
# Set rustflags as empty to build for legacy hosts.
4+
# I only build this for windows because Linux users on old machines can just compile their own binary
65
RUSTFLAGS="" cargo build --release --target=x86_64-pc-windows-gnu --locked
7-
mv target/release/libadaptivegrain_rs.so ./
6+
mv target/x86_64-pc-windows-gnu/release/adaptivegrain_rs.dll ./adaptivegrain_rs-no-fma.dll
7+
RUSTFLAGS="-C target-cpu=haswell" cargo build --release --locked
8+
RUSTFLAGS="-C target-cpu=haswell" cargo build --release --target=x86_64-pc-windows-gnu --locked
89
mv target/x86_64-pc-windows-gnu/release/adaptivegrain_rs.dll ./
10+
mv target/release/libadaptivegrain_rs.so ./
911
strip libadaptivegrain_rs.so
1012
strip adaptivegrain_rs.dll
13+
strip adaptivegrain_rs-no-fma.dll

0 commit comments

Comments
 (0)