File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 167
167
fi
168
168
169
169
# Now build with LTO on on both C++ and rust, but without cross-language LTO:
170
- cargo rustc -v --release -- -C lto
170
+ CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C lto
171
171
clang++ -std=c++11 -Wall -flto -O2 -pthread demo.cpp target/release/libldk.a -ldl
172
172
echo " C++ Bin size and runtime with only RL (LTO) optimized:"
173
173
ls -lha a.out
@@ -179,7 +179,7 @@ if [ "$HOST_PLATFORM" != "host: x86_64-apple-darwin" -a "$CLANGPP" != "" ]; then
179
179
# or Ubuntu packages). This should work fine on Distros which do more involved
180
180
# packaging than simply shipping the rustup binaries (eg Debian should Just Work
181
181
# here).
182
- cargo rustc -v --release -- -C linker-plugin-lto -C lto -C link-arg=-fuse-ld=lld
182
+ CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C linker-plugin-lto -C lto -C link-arg=-fuse-ld=lld
183
183
$CLANGPP -Wall -std=c++11 -flto -fuse-ld=lld -O2 -pthread demo.cpp target/release/libldk.a -ldl
184
184
echo " C++ Bin size and runtime with cross-language LTO:"
185
185
ls -lha a.out
You can’t perform that action at this time.
0 commit comments