Compare commits

..

2 Commits

4 changed files with 4 additions and 9 deletions

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
# Uses rustup to compile the linalg library for i386 and x86_84 architecture
nix-shell -p rustup --command "RUSTC_BOOTSTRAP=1 cargo build -Z unstable-options --target x86_64-unknown-linux-gnu --out-dir liblinalg/x86_64"
nix-shell -p rustup --command "RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-C target-cpu=i386 -C target-feature=+sse2\" cargo build -Z unstable-options --target i686-unknown-linux-gnu --out-dir liblinalg/i386"

View File

@ -54,16 +54,17 @@ rm -f ./*.o ./*.bc demo
if [ -z "$i386" ]; then if [ -z "$i386" ]; then
$nac3standalone "${nac3args[@]}" $nac3standalone "${nac3args[@]}"
cd linalg && cargo build -q && cd .. cd linalg && cargo build --release --target x86_64-unknown-linux-gnu -q && cd ..
clang -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c clang -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c
clang -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/liblinalg/x86_64/liblinalg.a clang -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/target/x86_64-unknown-linux-gnu/release/liblinalg.a
else else
# Enable SSE2 to avoid rounding errors with X87's 80-bit fp precision computations # Enable SSE2 to avoid rounding errors with X87's 80-bit fp precision computations
$nac3standalone --triple i386-pc-linux-gnu --target-features +sse2 "${nac3args[@]}" $nac3standalone --triple i386-pc-linux-gnu --target-features +sse2 "${nac3args[@]}"
cd linalg && cargo build --release --target i686-unknown-linux-gnu -q && cd ..
clang -m32 -c -std=gnu11 -Wall -Wextra -O3 -msse2 -o demo.o demo.c clang -m32 -c -std=gnu11 -Wall -Wextra -O3 -msse2 -o demo.o demo.c
clang -m32 -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/liblinalg/i386/liblinalg.a clang -m32 -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/target/i686-unknown-linux-gnu/release/liblinalg.a
fi fi
if [ -z "$outfile" ]; then if [ -z "$outfile" ]; then