Skip to content

Commit ecf736a

Browse files
committed
strip binaries in genbindings.sh for better size comparison
1 parent 151d4ac commit ecf736a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

genbindings.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fi
6363
# Test a statically-linked C++ version, tracking the resulting binary size and runtime
6464
# across debug, LTO, and cross-language LTO builds (using the same compiler each time).
6565
clang++ -std=c++11 -Wall -pthread demo.cpp target/debug/libldk.a -ldl
66-
./a.out >/dev/null
66+
strip ./a.out
6767
echo " C++ Bin size and runtime w/o optimization:"
6868
ls -lha a.out
6969
time ./a.out > /dev/null
@@ -169,6 +169,7 @@ fi
169169
# Now build with LTO on on both C++ and rust, but without cross-language LTO:
170170
CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C lto
171171
clang++ -std=c++11 -Wall -flto -O2 -pthread demo.cpp target/release/libldk.a -ldl
172+
strip ./a.out
172173
echo "C++ Bin size and runtime with only RL (LTO) optimized:"
173174
ls -lha a.out
174175
time ./a.out > /dev/null
@@ -181,6 +182,7 @@ if [ "$HOST_PLATFORM" != "host: x86_64-apple-darwin" -a "$CLANGPP" != "" ]; then
181182
# here).
182183
CARGO_PROFILE_RELEASE_LTO=true cargo rustc -v --release -- -C linker-plugin-lto -C lto -C link-arg=-fuse-ld=lld
183184
$CLANGPP -Wall -std=c++11 -flto -fuse-ld=lld -O2 -pthread demo.cpp target/release/libldk.a -ldl
185+
strip ./a.out
184186
echo "C++ Bin size and runtime with cross-language LTO:"
185187
ls -lha a.out
186188
time ./a.out > /dev/null

0 commit comments

Comments
 (0)