File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -189,24 +189,29 @@ RUN install -D ./options.proto /out/usr/include/github.com/chrusty/protoc-gen-js
189189RUN xx-verify /out/usr/bin/protoc-gen-jsonschema
190190
191191
192- FROM alpine:${ALPINE_IMAGE_VERSION} AS grpc_web
192+ FROM --platform=$BUILDPLATFORM alpine:${ALPINE_IMAGE_VERSION} AS grpc_web
193193RUN apk add --no-cache \
194194 autoconf \
195195 automake \
196196 build-base \
197+ clang \
197198 git \
198- libtool
199+ libtool \
200+ zlib-dev
199201ARG GRPC_WEB_VERSION
200202RUN git clone --recurse-submodules --branch=$GRPC_WEB_VERSION https://github.com/grpc/grpc-web.git
201203WORKDIR /grpc-web/third_party/protobuf
204+ COPY --from=xx / /
205+ ARG TARGETPLATFORM
206+ RUN xx-apk add --no-cache g++
202207RUN ./autogen.sh && \
203- ./configure && \
208+ ./configure --host=$(xx-clang --print-target-triple) && \
204209 make -j$(nproc) && \
205210 make install
206211WORKDIR /grpc-web
207- RUN make -j$(nproc) install-plugin
208- RUN install -Ds /usr/local/bin/protoc-gen-grpc-web /out/usr/bin/protoc-gen-grpc-web
209-
212+ RUN CXX=$(xx-info)-clang++ make -j$(nproc) install-plugin
213+ RUN install -D /usr/local/bin/protoc-gen-grpc-web /out/usr/bin/protoc-gen-grpc-web
214+ RUN xx-verify /out/usr/bin/protoc-gen-grpc-web
210215
211216FROM --platform=$BUILDPLATFORM rust:${RUST_IMAGE_VERSION} AS rust_target
212217COPY --from=xx / /
You can’t perform that action at this time.
0 commit comments