From: Matt Corallo Date: Thu, 16 Nov 2023 21:36:10 +0000 (+0000) Subject: [C#] Use faketime explicitly when compiling X-Git-Tag: v0.0.118.0-alpha1~8 X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=commitdiff_plain;h=0ae1b807d30d36862617580b5886f178000a52a9 [C#] Use faketime explicitly when compiling As targeting windows has a timestamp in the resulting dll, which we need to be deterministic. --- diff --git a/genbindings.sh b/genbindings.sh index c4a1b270..2e8204cc 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -160,8 +160,10 @@ if [ "$2" = "c_sharp" ]; then LINK="$LINK -Wl,--version-script=c_sharp/libcode.version" fi - $COMPILE -o bindings.o -c -O3 -I"$1"/lightning-c-bindings/include/ c_sharp/bindings.c - $COMPILE $LINK -o libldkcsharp_release$LDK_TARGET_SUFFIX.so -O3 bindings.o $LDK_LIB -lm + # When building for Windows, a timestamp is included in the resulting dll, + # so we have to build with faketime. + faketime -f "2021-01-01 00:00:00" $COMPILE -o bindings.o -c -O3 -I"$1"/lightning-c-bindings/include/ c_sharp/bindings.c + faketime -f "2021-01-01 00:00:00" $COMPILE $LINK -o libldkcsharp_release$LDK_TARGET_SUFFIX.so -O3 bindings.o $LDK_LIB -lm [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip libldkcsharp_release$LDK_TARGET_SUFFIX.so if [ "$LDK_JAR_TARGET" = "true" ]; then