X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=ae2a23578f05dd7fa5ec7d02de2452a0b97c92e4;hb=9fe3124eb701de6e7c371aff50e211864b78ccdd;hp=010296584482494c02fa008f23b236c59cd06da8;hpb=722a366fe2d864274537405fd739510b612fcc8e;p=rust-lightning diff --git a/genbindings.sh b/genbindings.sh index 01029658..ae2a2357 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -167,7 +167,7 @@ else fi # Now build with LTO on on both C++ and rust, but without cross-language LTO: -cargo rustc -v --release -- -C lto +CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C lto clang++ -std=c++11 -Wall -flto -O2 -pthread demo.cpp target/release/libldk.a -ldl echo "C++ Bin size and runtime with only RL (LTO) optimized:" ls -lha a.out @@ -179,7 +179,7 @@ if [ "$HOST_PLATFORM" != "host: x86_64-apple-darwin" -a "$CLANGPP" != "" ]; then # or Ubuntu packages). This should work fine on Distros which do more involved # packaging than simply shipping the rustup binaries (eg Debian should Just Work # here). - cargo rustc -v --release -- -C linker-plugin-lto -C lto -C link-arg=-fuse-ld=lld + CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C linker-plugin-lto -C lto -C link-arg=-fuse-ld=lld $CLANGPP -Wall -std=c++11 -flto -fuse-ld=lld -O2 -pthread demo.cpp target/release/libldk.a -ldl echo "C++ Bin size and runtime with cross-language LTO:" ls -lha a.out