Skip to content

Commit e09a5ed

Browse files
authored
Merge pull request #37 from x1unix/fix/35-fix-arm
fix(arm64): pass includes
2 parents 257865a + 6ce56d7 commit e09a5ed

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
release:
66
types:
77
- created
8+
env:
9+
LLVM_MINGW64_VER: 20250114
10+
811
jobs:
912
build:
1013
name: Build image
@@ -52,6 +55,7 @@ jobs:
5255
labels: ${{ steps.meta.outputs.labels }}
5356
build-args: |
5457
GO_VERSION=${{ env.GO_VERSION }}
58+
LLVM_MINGW64_VER=${{ env.LLVM_MINGW64_VER }}
5559
push: true
5660
- name: Print image digest
5761
run: echo ${{ steps.docker_build.outputs.digest }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN apt update &&\
1919
COPY --chmod=0755 scripts/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
2020
COPY --chmod=0755 scripts/install-llvm-mingw64.sh /tmp/install-llvm-mingw64.sh
2121
COPY --from=builder /tmp/llvm-mingw64 /tmp/llvm-mingw64
22-
RUN /tmp/install-llvm-mingw64.sh /tmp/llvm-mingw64
22+
RUN /tmp/install-llvm-mingw64.sh /tmp/llvm-mingw64 && rm -rf /tmp/*
2323
ENV PATH=/go/bin:$PATH \
2424
CGO_ENABLED=1 \
2525
GOOS=windows

scripts/docker-entrypoint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ arm64)
2121
export CC_FOR_TARGET=aarch64-w64-mingw32-gcc
2222
export CXX=aarch64-w64-mingw32-g++
2323
export CC=aarch64-w64-mingw32-gcc
24+
export CGO_FLAGS="$CGO_FLAGS -I/usr/generic-w64-mingw32/include"
2425
;;
2526
*)
2627
echo "Unsupported GOARCH variable value '$GOARCH'. Please set GOARCH environment variable to 'amd64', 'arm64' or '386'"

0 commit comments

Comments
 (0)