mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 04:27:58 +00:00
7f81f37e0c
Pre-eliminary support for LLVM releases and resolc binary releases by streamlining the build process for all supported hosts platforms. - Introduce the revive-llvm-builder crate with the revive-llvm builder utilty. - Do not rely on the LLVM dependency in $PATH to decouple the system LLVM installation from the LLVM host dependency. - Fix the emscripten build by decoupling the host and native LLVM dependencies. Thus allowing a single LLVM emscripten release that can be used on any host platform. - An example Dockerfile building an alpine container with a fully statically linked resolc ELF binary. - Remove the Debian builder utilities and workflow.
33 lines
882 B
Docker
33 lines
882 B
Docker
FROM rust:1.84.0 AS llvm-builder
|
|
WORKDIR /opt/revive
|
|
|
|
RUN apt update && \
|
|
apt upgrade -y && \
|
|
apt install -y cmake ninja-build curl git libssl-dev pkg-config clang lld musl
|
|
|
|
COPY . .
|
|
|
|
RUN make install-llvm-builder
|
|
RUN revive-llvm --target-env musl clone
|
|
RUN revive-llvm --target-env musl build
|
|
|
|
FROM messense/rust-musl-cross:x86_64-musl AS resolc-builder
|
|
WORKDIR /opt/revive
|
|
|
|
RUN apt update && \
|
|
apt upgrade -y && \
|
|
apt install -y pkg-config
|
|
|
|
COPY . .
|
|
COPY --from=llvm-builder /opt/revive/target-llvm /opt/revive/target-llvm
|
|
|
|
ENV LLVM_SYS_181_PREFIX=/opt/revive/target-llvm/musl/target-final
|
|
RUN make install-bin
|
|
|
|
FROM alpine:latest
|
|
ADD https://github.com/ethereum/solidity/releases/download/v0.8.28/solc-static-linux /usr/bin/solc
|
|
COPY --from=resolc-builder /root/.cargo/bin/resolc /usr/bin/resolc
|
|
|
|
RUN apk add --no-cache libc6-compat
|
|
RUN chmod +x /usr/bin/solc
|