Skip to content

Commit

Permalink
setup-build-env: install llvm development package
Browse files Browse the repository at this point in the history
Recently kernel BPF selftests gained an optional dependency on LLVM
development libraries [1] in order to support tests that disassemble
jit produced code. When necessary dependencies are not available such
tests are skipped.

This commit adds LLVM development libraries to the build environment,
thus enabling jit disassembly tests on the CI.

[1] https://lore.kernel.org/bpf/[email protected]/
  • Loading branch information
eddyz87 committed Aug 23, 2024
1 parent 08fa529 commit a409a23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build-selftests/build_selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ SELF_OPTS=$(cat <<EOF
-C ${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf
EOF
)
export LLVM_CONFIG=llvm-config-${LLVM_VERSION}

make ${MAKE_OPTS} headers
make ${MAKE_OPTS} ${SELF_OPTS} clean
make ${MAKE_OPTS} ${SELF_OPTS} -j $(kernel_build_make_jobs)
Expand Down
2 changes: 1 addition & 1 deletion setup-build-env/install_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ while [ $n -lt 5 ]; do
set +e && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && \
sudo apt-get update && \
sudo apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} && \
sudo apt-get install -y clang-${LLVM_VERSION} lld-${LLVM_VERSION} llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev && \
set -e && \
break
n=$(($n + 1))
Expand Down

0 comments on commit a409a23

Please sign in to comment.