mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 07:09:47 +00:00
Meta: Update to clang-19 in CI and build instructions
This commit is contained in:
parent
b165ffc868
commit
2ec97b4548
Notes:
github-actions[bot]
2024-12-28 13:40:54 +00:00
Author: https://github.com/trflynn89
Commit: 2ec97b4548
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3067
9 changed files with 20 additions and 20 deletions
|
@ -6,7 +6,7 @@
|
||||||
"ghcr.io/devcontainers/features/github-cli:1": {},
|
"ghcr.io/devcontainers/features/github-cli:1": {},
|
||||||
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
|
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
|
||||||
"./features/ladybird": {
|
"./features/ladybird": {
|
||||||
"llvm_version": 18
|
"llvm_version": 19
|
||||||
},
|
},
|
||||||
"./features/vcpkg-cache": {
|
"./features/vcpkg-cache": {
|
||||||
"release_triplet": true,
|
"release_triplet": true,
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
"git.inputValidationSubjectLength": 72,
|
"git.inputValidationSubjectLength": 72,
|
||||||
// If clangd was obtained from a package manager, its path can be set here.
|
// If clangd was obtained from a package manager, its path can be set here.
|
||||||
// Note: This has to be adjusted manually, to the "llvm_version" from above
|
// Note: This has to be adjusted manually, to the "llvm_version" from above
|
||||||
"clangd.path": "clangd-18",
|
"clangd.path": "clangd-19",
|
||||||
"clangd.arguments": [
|
"clangd.arguments": [
|
||||||
"--header-insertion=never" // See https://github.com/clangd/clangd/issues/1247
|
"--header-insertion=never" // See https://github.com/clangd/clangd/issues/1247
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
19,
|
19,
|
||||||
"trunk"
|
"trunk"
|
||||||
],
|
],
|
||||||
"default": 18,
|
"default": 19,
|
||||||
"description": "Select LLVM compiler version to use"
|
"description": "Select LLVM compiler version to use"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ set -e
|
||||||
|
|
||||||
# Feature options
|
# Feature options
|
||||||
|
|
||||||
LLVM_VERSION=${LLVM_VERSION:-18}
|
LLVM_VERSION=${LLVM_VERSION:-19}
|
||||||
### Check distro
|
### Check distro
|
||||||
|
|
||||||
if [ ! -f /etc/lsb-release ]; then
|
if [ ! -f /etc/lsb-release ]; then
|
||||||
|
|
12
.github/actions/setup/action.yml
vendored
12
.github/actions/setup/action.yml
vendored
|
@ -28,15 +28,15 @@ runs:
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main'
|
sudo add-apt-repository 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble-19 main'
|
||||||
|
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y autoconf autoconf-archive automake build-essential ccache clang-18 clang++-18 cmake curl fonts-liberation2 \
|
sudo apt-get install -y autoconf autoconf-archive automake build-essential ccache clang-19 clang++-19 cmake curl fonts-liberation2 \
|
||||||
gcc-13 g++-13 libegl1-mesa-dev libgl1-mesa-dev libpulse-dev libssl-dev \
|
gcc-13 g++-13 libegl1-mesa-dev libgl1-mesa-dev libpulse-dev libssl-dev \
|
||||||
libstdc++-13-dev lld-18 nasm ninja-build qt6-base-dev qt6-tools-dev-tools tar unzip zip
|
libstdc++-13-dev lld-19 nasm ninja-build qt6-base-dev qt6-tools-dev-tools tar unzip zip
|
||||||
|
|
||||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
|
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100
|
||||||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
|
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 100
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
brew update
|
brew update
|
||||||
brew install autoconf autoconf-archive automake bash ccache coreutils llvm@18 nasm ninja qt unzip wabt
|
brew install autoconf autoconf-archive automake bash ccache coreutils llvm@19 nasm ninja qt unzip wabt
|
||||||
|
|
||||||
- name: 'Install vcpkg'
|
- name: 'Install vcpkg'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
4
.github/workflows/ladybird-js-artifacts.yml
vendored
4
.github/workflows/ladybird-js-artifacts.yml
vendored
|
@ -52,8 +52,8 @@ jobs:
|
||||||
- name: Create build directory Ubuntu
|
- name: Create build directory Ubuntu
|
||||||
run: |
|
run: |
|
||||||
cmake --preset Distribution_CI \
|
cmake --preset Distribution_CI \
|
||||||
-DCMAKE_C_COMPILER=clang-18 \
|
-DCMAKE_C_COMPILER=clang-19 \
|
||||||
-DCMAKE_CXX_COMPILER=clang++-18 \
|
-DCMAKE_CXX_COMPILER=clang++-19 \
|
||||||
-DENABLE_GUI_TARGETS=OFF
|
-DENABLE_GUI_TARGETS=OFF
|
||||||
if: ${{ matrix.os_name == 'Linux' }}
|
if: ${{ matrix.os_name == 'Linux' }}
|
||||||
|
|
||||||
|
|
4
.github/workflows/lagom-template.yml
vendored
4
.github/workflows/lagom-template.yml
vendored
|
@ -64,8 +64,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
if ${{ inputs.os_name == 'Linux' }} ; then
|
if ${{ inputs.os_name == 'Linux' }} ; then
|
||||||
if ${{ inputs.toolchain == 'Clang' }} ; then
|
if ${{ inputs.toolchain == 'Clang' }} ; then
|
||||||
echo "host_cc=clang-18" >> "$GITHUB_OUTPUT"
|
echo "host_cc=clang-19" >> "$GITHUB_OUTPUT"
|
||||||
echo "host_cxx=clang++-18" >> "$GITHUB_OUTPUT"
|
echo "host_cxx=clang++-19" >> "$GITHUB_OUTPUT"
|
||||||
elif ${{ inputs.toolchain == 'GNU' }} ; then
|
elif ${{ inputs.toolchain == 'GNU' }} ; then
|
||||||
echo "host_cc=gcc-13" >> "$GITHUB_OUTPUT"
|
echo "host_cc=gcc-13" >> "$GITHUB_OUTPUT"
|
||||||
echo "host_cxx=g++-13" >> "$GITHUB_OUTPUT"
|
echo "host_cxx=g++-13" >> "$GITHUB_OUTPUT"
|
||||||
|
|
|
@ -49,10 +49,10 @@ sudo wget -O /usr/share/keyrings/llvm-snapshot.gpg.key https://apt.llvm.org/llvm
|
||||||
# Optional: Verify the GPG key manually
|
# Optional: Verify the GPG key manually
|
||||||
|
|
||||||
# Use the key to authorize an entry for apt.llvm.org in apt sources list
|
# Use the key to authorize an entry for apt.llvm.org in apt sources list
|
||||||
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-18 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
|
echo "deb [signed-by=/usr/share/keyrings/llvm-snapshot.gpg.key] https://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-19 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
|
||||||
|
|
||||||
# Update apt package list and install clang and associated packages
|
# Update apt package list and install clang and associated packages
|
||||||
sudo apt update -y && sudo apt install clang-18 clangd-18 clang-format-18 clang-tidy-18 lld-18 -y
|
sudo apt update -y && sudo apt install clang-19 clangd-19 clang-format-19 clang-tidy-19 lld-19 -y
|
||||||
```
|
```
|
||||||
|
|
||||||
- Alternative: Install gcc-13 or newer from [Ubuntu Toolchain PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test):
|
- Alternative: Install gcc-13 or newer from [Ubuntu Toolchain PPA](https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test):
|
||||||
|
@ -102,7 +102,7 @@ sudo xbps-install -S git bash gcc python3 curl cmake zip unzip linux-headers mak
|
||||||
### NixOS or with Nix:
|
### NixOS or with Nix:
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Ladybird's build system uses vcpkg to vendor third-party dependencies, which proves undesirable to use with Nix for [several reasons](https://github.com/LadybirdBrowser/ladybird/issues/371).
|
> Ladybird's build system uses vcpkg to vendor third-party dependencies, which proves undesirable to use with Nix for [several reasons](https://github.com/LadybirdBrowser/ladybird/issues/371).
|
||||||
> As a result, using `ladybird.sh` to compile and run Ladybird will fail. Therefore, it is necessary to use system packages provided by the dev-shell.
|
> As a result, using `ladybird.sh` to compile and run Ladybird will fail. Therefore, it is necessary to use system packages provided by the dev-shell.
|
||||||
|
|
||||||
To build the project, first enter the shell:
|
To build the project, first enter the shell:
|
||||||
|
@ -145,7 +145,7 @@ brew install autoconf autoconf-archive automake ccache cmake nasm ninja pkg-conf
|
||||||
|
|
||||||
If you wish to use clang from homebrew instead:
|
If you wish to use clang from homebrew instead:
|
||||||
```
|
```
|
||||||
brew install llvm@18
|
brew install llvm@19
|
||||||
```
|
```
|
||||||
|
|
||||||
If you also plan to use the Qt chrome on macOS:
|
If you also plan to use the Qt chrome on macOS:
|
||||||
|
|
|
@ -14,7 +14,7 @@ die() {
|
||||||
|
|
||||||
pick_clang() {
|
pick_clang() {
|
||||||
local BEST_VERSION=0
|
local BEST_VERSION=0
|
||||||
for CLANG_CANDIDATE in clang clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang ; do
|
for CLANG_CANDIDATE in clang clang-17 clang-18 clang-19 /opt/homebrew/opt/llvm/bin/clang ; do
|
||||||
if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then
|
if ! command -v $CLANG_CANDIDATE >/dev/null 2>&1; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -56,7 +56,7 @@ pick_host_compiler() {
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find_newest_compiler clang clang-17 clang-18 /opt/homebrew/opt/llvm/bin/clang
|
find_newest_compiler clang clang-17 clang-18 clang-19 /opt/homebrew/opt/llvm/bin/clang
|
||||||
if is_supported_compiler "$HOST_COMPILER"; then
|
if is_supported_compiler "$HOST_COMPILER"; then
|
||||||
export CC="${HOST_COMPILER}"
|
export CC="${HOST_COMPILER}"
|
||||||
export CXX="${HOST_COMPILER/clang/clang++}"
|
export CXX="${HOST_COMPILER/clang/clang++}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue