Move link-time optimization config into Cargo.toml
(#658)
Passing `-C lto` is more or less unsupported and may stop working, so do this in Cargo.toml instead.
This commit is contained in:
parent
c1a0001939
commit
8fad0626f8
@ -50,3 +50,6 @@ path = "test-utilities"
|
|||||||
# their build machines some cycles.
|
# their build machines some cycles.
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = true
|
||||||
|
@ -17,11 +17,11 @@ echo "Building $bin..."
|
|||||||
|
|
||||||
case $os in
|
case $os in
|
||||||
ubuntu-latest | macos-latest)
|
ubuntu-latest | macos-latest)
|
||||||
cargo rustc --bin $bin --target $target --release -- -C lto
|
cargo rustc --bin $bin --target $target --release
|
||||||
executable=target/$target/release/$bin
|
executable=target/$target/release/$bin
|
||||||
;;
|
;;
|
||||||
windows-latest)
|
windows-latest)
|
||||||
cargo rustc --bin $bin --target $target --release -- -C lto -C target-feature="+crt-static"
|
cargo rustc --bin $bin --target $target --release -- -C target-feature="+crt-static"
|
||||||
executable=target/$target/release/$bin.exe
|
executable=target/$target/release/$bin.exe
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user