File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed
circleci/images/stylechecker Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,22 @@ apk add --no-cache --virtual installdeps \
1616 gcc \
1717 gzip \
1818 musl-dev \
19- cargo \
20- rust \
2119 openssl-dev \
2220 py3-pip \
2321 python3-dev \
2422 tar \
23+ llvm21 \
24+ llvm21-dev \
25+ llvm21-libs \
26+ llvm21-linker-tools \
27+ llvm21-static \
28+ clang \
29+ elfutils-dev \
30+ zlib-dev \
31+ zlib-static \
32+ libxml2-static \
33+ xz-static \
34+ zstd-static
2535
2636apk add --no-cache \
2737 ca-certificates \
@@ -50,7 +60,26 @@ cd ../..
5060rm -rf uncrustify-uncrustify-0.82.0/
5161
5262export CARGO_HOME="${CARGO_HOME:-/root/.cargo}"
53- cargo install --locked bpf-linker
63+ export RUSTUP_HOME="${RUSTUP_HOME:-/root/.rustup}"
64+
65+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-host x86_64-unknown-linux-musl
66+ . "$CARGO_HOME/env"
67+ rustup toolchain install nightly-x86_64-unknown-linux-musl
68+ rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-musl
69+ cargo install --locked bpf-linker --no-default-features --features llvm-21
70+ export PATH="/root/.cargo/bin:${PATH}"
71+
72+ LLVM_CONFIG="$(command -v llvm-config || command -v llvm-config-21)"
73+ LLVM_LIBDIR="$(${LLVM_CONFIG} --libdir)"
74+ LLVM_PREFIX="$(dirname " ${LLVM_LIBDIR}")"
75+ export LD_LIBRARY_PATH="${LLVM_LIBDIR}:${LD_LIBRARY_PATH:-}"
76+ export PKG_CONFIG_PATH="${LLVM_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH:-}"
77+ export LLVM_SYS_211_PREFIX="${LLVM_SYS_211_PREFIX:-${LLVM_PREFIX}}"
78+ export LLVM_SYS_211_STATIC=1
79+ export AYA_RUSTC_LLVM_PROXY_DISABLE_DLOPEN=1
80+ export AYA_RUSTC_LLVM_PROXY_LIB_DIR="${LLVM_LIBDIR}"
81+
82+
5483install -m 755 "$CARGO_HOME/bin/bpf-linker" /usr/local/bin/bpf-linker
5584
5685# this image is only used for testing purposes, so should be okay to overwrite system-managed packages
You can’t perform that action at this time.
0 commit comments