Add Rust compilation flags.

This commit is contained in:
inference 2022-11-06 09:10:09 +00:00
parent 8c2f7884c6
commit 6b2be8ebc3

View File

@ -26,6 +26,7 @@ LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags.
CFLAGS="-march=znver3 -O2 -pipe -flto=thin -U__gnu_linux__ ${C_SEC}"
CXXFLAGS="-march=znver3 -O2 -pipe -flto=thin ${C_SEC}"
RUSTFLAGS="-C target-cpu=znver3 -C opt-level=2 -C lto -C embed-bitcode=y -C debuginfo=0"
## Linker flags.
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--thinlto-jobs=4 ${LD_SEC}"