Skip to content

Commit

Permalink
default to llvm 16
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
chantra authored and danielocfb committed Feb 8, 2023
1 parent ee05824 commit 09640d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ print_notice() {

# No arguments
llvm_default_version() {
echo "16"
}

# No arguments
llvm_latest_version() {
echo "17"
}

Expand Down
9 changes: 8 additions & 1 deletion setup-build-env/install_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ sudo apt-get install -y g++ libelf-dev

LLVM_VERSION=$(llvm_default_version)

echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal main" | sudo tee /etc/apt/sources.list.d/llvm.list
REPO_DISTRO_SUFFIX="-${LLVM_VERSION}"

if [[ "${LLVM_VERSION}" == $(llvm_latest_version) ]]
then
REPO_DISTRO_SUFFIX=""
fi

echo "deb https://apt.llvm.org/focal/ llvm-toolchain-focal${REPO_DISTRO_SUFFIX} main" | sudo tee /etc/apt/sources.list.d/llvm.list
n=0
while [ $n -lt 5 ]; do
set +e && \
Expand Down

0 comments on commit 09640d9

Please sign in to comment.