]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Build native debug binaries with --cfg=test_mod_pointers
authorMatt Corallo <git@bluematt.me>
Wed, 18 Aug 2021 21:13:52 +0000 (21:13 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 19 Aug 2021 17:03:33 +0000 (17:03 +0000)
genbindings.sh

index c1bfc8dde3cc6b993c7ba1de73f0cd0af7bf8074..3aa2f005390c19ed71a6a5acdca9d4d553c466b6 100755 (executable)
@@ -183,7 +183,7 @@ echo -e '}' >> lightning-c-bindings/src/version.rs
 # Now cd to lightning-c-bindings, build the generated bindings, and call cbindgen to build a C header file
 cd lightning-c-bindings
 
-cargo build
+RUSTFLAGS="$RUSTFLAGS --cfg=test_mod_pointers" cargo build
 if [ "$CFLAGS_aarch64_apple_darwin" != "" ]; then
        RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=apple-a14" cargo build --target aarch64-apple-darwin
 fi
@@ -403,7 +403,7 @@ if [ "$HOST_PLATFORM" = "host: x86_64-unknown-linux-gnu" -o "$HOST_PLATFORM" = "
                if [ "$CFLAGS_aarch64_apple_darwin" != "" ]; then
                        RUSTFLAGS="$BASE_RUSTFLAGS -C target-cpu=apple-a14" RUSTC_BOOTSTRAP=1 cargo rustc --target aarch64-apple-darwin -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
                fi
-               RUSTC_BOOTSTRAP=1 cargo rustc -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
+               RUSTFLAGS="$RUSTFLAGS --cfg=test_mod_pointers" RUSTC_BOOTSTRAP=1 cargo rustc -v -- -Zsanitizer=address -Cforce-frame-pointers=yes || ( mv Cargo.toml.bk Cargo.toml; exit 1)
                mv Cargo.toml.bk Cargo.toml
 
                # First the C demo app...