X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=genbindings.sh;h=533ee7c1722f13fe405f53790a45203bab22b471;hb=92cd6c3207545d92bd1a327b07fd7d765eda067e;hp=45af05a3bfae75bc5f827e4af5a9450a810b1232;hpb=3c443e0e5842959687a0b4ca9e7e222347f0d901;p=ldk-c-bindings diff --git a/genbindings.sh b/genbindings.sh index 45af05a..533ee7c 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -113,7 +113,7 @@ static inline const char* check_get_ldk_bindings_version() { } #endif /* _LDK_HEADER_VER */ EOF -)" >> lightning-c-bindings/include/ldk_ver.h +)" > lightning-c-bindings/include/ldk_ver.h rm -rf lightning-c-bindings/src @@ -486,9 +486,9 @@ if [ "$2" = "false" -a "$(rustc --print target-list | grep wasm32-wasi)" != "" ] if clang -nostdlib -o /dev/null --target=wasm32-wasi -Wl,--no-entry genbindings_wasm_test_file.c > /dev/null 2>&1; then # And if it does, build a WASM binary without capturing errors export CFLAGS_wasm32_wasi="$BASE_CFLAGS -target wasm32 -O1" - RUSTFLAGS="$RUSTFLAGS --cfg=test_mod_pointers" cargo build $CARGO_BUILD_ARGS -v --target=wasm32-wasi + RUSTFLAGS="$BASE_RUSTFLAGS -C opt-level=1 --cfg=test_mod_pointers" cargo build $CARGO_BUILD_ARGS -v --target=wasm32-wasi export CFLAGS_wasm32_wasi="$BASE_CFLAGS -fembed-bitcode -target wasm32 -Oz" - RUSTFLAGS="$RUSTFLAGS -C embed-bitcode=yes -C opt-level=z -C linker-plugin-lto -C lto" CARGO_PROFILE_RELEASE_LTO=true cargo build $CARGO_BUILD_ARGS -v --release --target=wasm32-wasi + RUSTFLAGS="$BASE_RUSTFLAGS -C embed-bitcode=yes -C opt-level=z -C linker-plugin-lto -C lto" CARGO_PROFILE_RELEASE_LTO=true cargo build $CARGO_BUILD_ARGS -v --release --target=wasm32-wasi else echo "Cannot build WASM lib as clang does not seem to support the wasm32-wasi target" fi