From ed3ac5a1134c9b2c165480906fdedfb70f118d9c Mon Sep 17 00:00:00 2001 From: Carl Lundin Date: Tue, 28 May 2024 16:02:39 -0700 Subject: [PATCH] chore: Add static archives to build script on MacOS and Linux --- build/scripts/darwin_amd64.sh | 3 ++- build/scripts/linux_amd64.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/scripts/darwin_amd64.sh b/build/scripts/darwin_amd64.sh index 7c40a0d..dc5ecc0 100755 --- a/build/scripts/darwin_amd64.sh +++ b/build/scripts/darwin_amd64.sh @@ -28,5 +28,6 @@ mv darwin ./../../../build/bin/darwin_amd64/ecp cd ./../../.. # Build the signer library -go build -buildmode=c-shared -buildmode=c-shared -ldflags="-X=main.Version=$CURRENT_TAG" -o build/bin/darwin_amd64/libecp.dylib cshared/main.go +go build -buildmode=c-shared -ldflags="-X=main.Version=$CURRENT_TAG" -o build/bin/darwin_amd64/libecp.dylib cshared/main.go +go build -buildmode=c-archive -ldflags="-X=main.Version=$CURRENT_TAG" -o build/bin/darwin_amd64/libecp.a cshared/main.go rm build/bin/darwin_amd64/libecp.h diff --git a/build/scripts/linux_amd64.sh b/build/scripts/linux_amd64.sh index c9c8376..0fc0037 100755 --- a/build/scripts/linux_amd64.sh +++ b/build/scripts/linux_amd64.sh @@ -23,6 +23,7 @@ mkdir -p ./build/bin/linux_amd64 # Build the signer library go build -buildmode=c-shared -ldflags="-X=main.Version=$CURRENT_TAG" -o build/bin/linux_amd64/libecp.so cshared/main.go +go build -buildmode=c-archive -ldflags="-X=main.Version=$CURRENT_TAG" -o build/bin/linux_amd64/libecp.a cshared/main.go rm build/bin/linux_amd64/libecp.h # Build the signer binary