projects
/
ldk-c-bindings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix OSX building by not redirecting to `/dev/null`
[ldk-c-bindings]
/
genbindings.sh
diff --git
a/genbindings.sh
b/genbindings.sh
index f26ea5d38057ca2c81813a9ef3f2cf8da954d50f..65dbb25982d19737302935c75da520dee3945da3 100755
(executable)
--- a/
genbindings.sh
+++ b/
genbindings.sh
@@
-336,9
+336,9
@@
fi
if [ "$2" = "true" ]; then
clang++ $LOCAL_CFLAGS -std=c++11 demo.cpp target/debug/libldk.a -ldl
strip ./a.out
if [ "$2" = "true" ]; then
clang++ $LOCAL_CFLAGS -std=c++11 demo.cpp target/debug/libldk.a -ldl
strip ./a.out
+ time ./a.out
echo " C++ Bin size and runtime w/o optimization:"
ls -lha a.out
echo " C++ Bin size and runtime w/o optimization:"
ls -lha a.out
- time ./a.out > /dev/null
fi
# Then, check with memory sanitizer, if we're on Linux and have rustc nightly
fi
# Then, check with memory sanitizer, if we're on Linux and have rustc nightly
@@
-490,9
+490,9
@@
if [ "$2" = "true" ]; then
fi
strip ./a.out
fi
strip ./a.out
+time ./a.out
echo "C++ Bin size and runtime with only RL (LTO) optimized:"
ls -lha a.out
echo "C++ Bin size and runtime with only RL (LTO) optimized:"
ls -lha a.out
-time ./a.out > /dev/null
if [ "$CLANGPP" != "" ]; then
# If we can use cross-language LTO, use it for building C dependencies (i.e. libsecp256k1) as well
if [ "$CLANGPP" != "" ]; then
# If we can use cross-language LTO, use it for building C dependencies (i.e. libsecp256k1) as well
@@
-559,11
+559,12
@@
if [ "$CLANGPP" != "" -a "$LLD" != "" ]; then
CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="$RUSTFLAGS -C embed-bitcode=yes -C linker-plugin-lto -C lto -C linker=$CLANG $LINK_ARG_FLAGS -C link-arg=-march=sandybridge -C link-arg=-mcpu=sandybridge -C link-arg=-mtune=sandybridge" cargo build $CARGO_BUILD_ARGS -v --release
if [ "$2" = "true" ]; then
CARGO_PROFILE_RELEASE_LTO=true RUSTFLAGS="$RUSTFLAGS -C embed-bitcode=yes -C linker-plugin-lto -C lto -C linker=$CLANG $LINK_ARG_FLAGS -C link-arg=-march=sandybridge -C link-arg=-mcpu=sandybridge -C link-arg=-mtune=sandybridge" cargo build $CARGO_BUILD_ARGS -v --release
if [ "$2" = "true" ]; then
- $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -O2 demo.cpp target/release/libldk.a -ldl
+ $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -O2 -c demo.cpp -o demo.o
+ $CLANGPP $LOCAL_CFLAGS -flto -fuse-ld=$LLD -Wl,--lto-O2 -Wl,-O2 -O2 demo.o target/release/libldk.a -ldl
strip ./a.out
strip ./a.out
+ time ./a.out
echo "C++ Bin size and runtime with cross-language LTO:"
ls -lha a.out
echo "C++ Bin size and runtime with cross-language LTO:"
ls -lha a.out
- time ./a.out > /dev/null
fi
fi
else
fi
fi
else