Skip to content

Commit 5280e18

Browse files
authored
feat(build): update build targets (OS/ARCH) (#107)
1 parent 0e50ce1 commit 5280e18

7 files changed

+17
-7
lines changed

build/pbf2json.darwin-arm64

5.29 MB
Binary file not shown.

build/pbf2json.darwin-x64

-739 KB
Binary file not shown.

build/pbf2json.linux-arm

-1.7 MB
Binary file not shown.

build/pbf2json.linux-arm64

1.52 MB
Binary file not shown.

build/pbf2json.linux-x64

-218 KB
Binary file not shown.

build/pbf2json.win32-x64

-98 KB
Binary file not shown.

compile.sh

+17-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ function compress() {
3333
# ensure build directory exists
3434
rm -rf build; mkdir -p build
3535

36-
echo "[compile] linux arm";
37-
env GOOS=linux GOARCH=arm go build -ldflags="-s -w" -gcflags=-trimpath="${GOPATH}" -asmflags=-trimpath="${GOPATH}";
36+
echo "[compile] linux arm64";
37+
env GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -gcflags=-trimpath="${GOPATH}" -asmflags=-trimpath="${GOPATH}";
3838
assert $?;
3939
chmod +x pbf2json;
40-
mv pbf2json build/pbf2json.linux-arm;
41-
check 'build/pbf2json.linux-arm' 'ELF 32-bit LSB executable';
42-
compress 'build/pbf2json.linux-arm';
40+
mv pbf2json build/pbf2json.linux-arm64;
41+
check 'build/pbf2json.linux-arm64' 'ELF 64-bit LSB executable';
42+
compress 'build/pbf2json.linux-arm64';
4343

4444
echo "[compile] linux x64";
4545
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -gcflags=-trimpath="${GOPATH}" -asmflags=-trimpath="${GOPATH}";
@@ -58,10 +58,20 @@ check 'build/pbf2json.darwin-x64' 'Mach-O 64-bit';
5858
# UPX disabled due to https://github.com/upx/upx/issues/187
5959
# compress 'build/pbf2json.darwin-x64';
6060

61+
echo "[compile] darwin arm64";
62+
env GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -gcflags=-trimpath="${GOPATH}" -asmflags=-trimpath="${GOPATH}";
63+
assert $?;
64+
chmod +x pbf2json;
65+
mv pbf2json build/pbf2json.darwin-arm64;
66+
check 'build/pbf2json.darwin-arm64' 'Mach-O 64-bit';
67+
# UPX disabled due to https://github.com/upx/upx/issues/187
68+
# note: this is untested, assumed to be the same bug as above
69+
# compress 'build/pbf2json.darwin-arm64';
70+
6171
echo "[compile] windows x64";
62-
env GOOS=windows GOARCH=386 go build -ldflags="-s -w" -gcflags=-trimpath=${GOPATH} -asmflags=-trimpath=${GOPATH} -o pbf2json.exe;
72+
env GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -gcflags=-trimpath=${GOPATH} -asmflags=-trimpath=${GOPATH} -o pbf2json.exe;
6373
assert $?;
6474
chmod +x pbf2json.exe;
6575
mv pbf2json.exe build/pbf2json.win32-x64;
66-
check 'build/pbf2json.win32-x64' 'PE32 executable';
76+
check 'build/pbf2json.win32-x64' 'PE32+ executable (console) x86-64';
6777
compress 'build/pbf2json.win32-x64';

0 commit comments

Comments
 (0)