ndk-make.sh: use environment variable to control LTO

This commit is contained in:
Alexander Krotov 2020-11-14 21:28:15 +03:00
parent 222d71808a
commit 7d7f93939f

View file

@ -73,7 +73,9 @@ unset CPATH
if test -z $1; then
echo Full build
export RUSTFLAGS="-C lto=on -C embed-bitcode=yes"
# According to 1.45.0 changelog in https://github.com/rust-lang/rust/blob/master/RELEASES.md,
# "The recommended way to control LTO is with Cargo profiles, either in Cargo.toml or .cargo/config, or by setting CARGO_PROFILE_<name>_LTO in the environment."
export CARGO_PROFILE_RELEASE_LTO=on
RELEASE="release"
RELEASEFLAG="--release"
else