@@ -20,7 +20,7 @@ GOLIST := go list $(PKG)/... | grep -v '/vendor/'
2020XARGS := xargs -L 1
2121
2222LDFLAGS := -s -w -buildid=
23- LDFLAGS_MOBILE := -ldflags "$(call make_ldflags, ${tags}, -s -w) "
23+ LDFLAGS_MOBILE := -ldflags "$(call make_ldflags, ${tags}, -s -w -buildid= ) "
2424
2525RM := rm -f
2626CP := cp
6666wasm :
6767 # The appengine build tag is needed because of the jessevdk/go-flags library
6868 # that has some OS specific terminal code that doesn't compile to WASM.
69- cd cmd/wasm-client; GOOS=js GOARCH=wasm go build -trimpath -ldflags=" $( LDFLAGS) " -tags=" $( RPC_TAGS) " -v -o wasm-client.wasm .
69+ cd cmd/wasm-client; CGO_ENABLED=0 GOOS=js GOARCH=wasm go build -trimpath -ldflags=" $( LDFLAGS) " -tags=" $( RPC_TAGS) " -v -o wasm-client.wasm .
7070 $(CP ) cmd/wasm-client/wasm-client.wasm example/wasm-client.wasm
7171
7272apple :
@@ -87,10 +87,45 @@ macos:
8787android :
8888 @$(call print, "Building Android library ($(ANDROID_BUILD ) ) ." )
8989 mkdir -p $(ANDROID_BUILD_DIR )
90- GOOS=js $(GOMOBILE_BIN ) bind -target=android -tags=" mobile $( DEV_TAGS) $( RPC_TAGS) " -androidapi 21 $(LDFLAGS_MOBILE ) -v -o $(ANDROID_BUILD ) $(MOBILE_PKG )
90+ CGO_ENABLED=0 GO386=softfloat GOOS=js $(GOMOBILE_BIN ) bind -target=android -tags=" mobile $( DEV_TAGS) $( RPC_TAGS) " -androidapi 21 $(LDFLAGS_MOBILE ) -v -o $(ANDROID_BUILD ) -trimpath $(MOBILE_PKG )
9191
9292mobile : ios android
9393
94+ repro-wasm :
95+ # Build the repro-wasm image
96+ docker build -f Dockerfile-wasm -t repro-wasm-image --no-cache .
97+
98+ # Run the repro-wasm-image in a new container called repro-wasm
99+ docker run --name repro-wasm repro-wasm-image
100+
101+ # Copy the compiled WASM file to the host machine
102+ mkdir -p reproducible-builds
103+ docker cp repro-wasm:/app/cmd/wasm-client/wasm-client.wasm ./reproducible-builds/
104+
105+ # Remove the repro-wasm container
106+ docker rm repro-wasm
107+
108+ # Remove the repro-wasm-image
109+ docker image rm repro-wasm-image
110+
111+ repro-android :
112+ # Build the repro-android image
113+ docker build -f Dockerfile-android -t repro-android-image --no-cache .
114+
115+ # Run the repro-android-image in a new container called repro-android
116+ docker run --name repro-android repro-android-image
117+
118+ # Copy the built Android library files to the host machine
119+ mkdir -p reproducible-builds/android
120+ docker cp repro-android:/gomobile/src/github.com/lightninglabs/lightning-node-connect/build/android/lnc-mobile.aar ./reproducible-builds/android
121+ docker cp repro-android:/gomobile/src/github.com/lightninglabs/lightning-node-connect/build/android/lnc-mobile-sources.jar ./reproducible-builds/android
122+
123+ # Remove the repro-android container
124+ docker rm repro-android
125+
126+ # Remove the repro-android-image
127+ docker image rm repro-android-image
128+
94129# =======
95130# TESTING
96131# =======
0 commit comments