Compare commits
2 Commits
63d2b49b09
...
2237137f1a
Author | SHA1 | Date | |
---|---|---|---|
2237137f1a | |||
f8d3a374e6 |
6
nac3standalone/demo/linalg/build.sh
Executable file
6
nac3standalone/demo/linalg/build.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/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"
|
BIN
nac3standalone/demo/linalg/liblinalg/i386/liblinalg.a
Normal file
BIN
nac3standalone/demo/linalg/liblinalg/i386/liblinalg.a
Normal file
Binary file not shown.
BIN
nac3standalone/demo/linalg/liblinalg/x86_64/liblinalg.a
Normal file
BIN
nac3standalone/demo/linalg/liblinalg/x86_64/liblinalg.a
Normal file
Binary file not shown.
@ -54,17 +54,16 @@ rm -f ./*.o ./*.bc demo
|
|||||||
if [ -z "$i386" ]; then
|
if [ -z "$i386" ]; then
|
||||||
$nac3standalone "${nac3args[@]}"
|
$nac3standalone "${nac3args[@]}"
|
||||||
|
|
||||||
cd linalg && cargo build --release --target x86_64-unknown-linux-gnu -q && cd ..
|
cd linalg && cargo build -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/target/x86_64-unknown-linux-gnu/release/liblinalg.a
|
clang -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/liblinalg/x86_64/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/target/i686-unknown-linux-gnu/release/liblinalg.a
|
clang -m32 -lm -Wl,--no-warn-search-mismatch -o demo module.o demo.o linalg/liblinalg/i386/liblinalg.a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$outfile" ]; then
|
if [ -z "$outfile" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user