Skip to content

Commit 09640d9

Browse files
chantradanielocfb
authored andcommitted
default to llvm 16
This change get us back onto llvm-16 by default as it seemsthat currently, qemu VMs are failing to boot when the kernel is built with llvm 17, it is very likely related to ClangBuiltLinux/linux#1800 . Because of the layout of LLVM's apt repo, unless the version is the latest they distribute, the repository distro need to use the version number as suffix. Signed-off-by: Manu Bretelle <[email protected]>
1 parent ee05824 commit 09640d9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

helpers.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ print_notice() {
3939

4040
# No arguments
4141
llvm_default_version() {
42+
echo "16"
43+
}
44+
45+
# No arguments
46+
llvm_latest_version() {
4247
echo "17"
4348
}
4449

setup-build-env/install_clang.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ sudo apt-get install -y g++ libelf-dev
1010

1111
LLVM_VERSION=$(llvm_default_version)
1212

13-
echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal main" | sudo tee /etc/apt/sources.list.d/llvm.list
13+
REPO_DISTRO_SUFFIX="-${LLVM_VERSION}"
14+
15+
if [[ "${LLVM_VERSION}" == $(llvm_latest_version) ]]
16+
then
17+
REPO_DISTRO_SUFFIX=""
18+
fi
19+
20+
echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal${REPO_DISTRO_SUFFIX} main" | sudo tee /etc/apt/sources.list.d/llvm.list
1421
n=0
1522
while [ $n -lt 5 ]; do
1623
set +e && \

0 commit comments

Comments
 (0)