File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1515# Use the latest stable golang 1.x to compile to a binary
1616FROM --platform=$BUILDPLATFORM golang:1 AS build
1717
18-
19-
20- # Install Zig
18+ # Install Zig for CGO cross-compilation
2119RUN apt-get update && apt-get install -y xz-utils
2220RUN curl -fL "https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz" -o zig.tar.xz && \
2321 mkdir -p /zig && \
@@ -44,7 +42,7 @@ RUN export ZIG_TARGET="" && \
4442 CC="/zig/zig cc -target ${ZIG_TARGET}" \
4543 CXX="/zig/zig c++ -target ${ZIG_TARGET}" \
4644 go build \
47- -ldflags "-linkmode external -extldflags '-static' - X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}" \
45+ -ldflags "-X github.com/googleapis/genai-toolbox/cmd.buildType=${BUILD_TYPE} -X github.com/googleapis/genai-toolbox/cmd.commitSha=${COMMIT_SHA}" \
4846 -o genai-toolbox .
4947
5048# Final Stage
You can’t perform that action at this time.
0 commit comments