mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
build: bump minimum Clang version to 19
This is now required by V8. Refs: https://github.com/nodejs/node-v8/issues/302 PR-URL: https://github.com/nodejs/node/pull/59048 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
parent
037b65500b
commit
8a87ba031b
7 changed files with 56 additions and 12 deletions
15
.github/actions/install-clang/action.yml
vendored
Normal file
15
.github/actions/install-clang/action.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: Install Clang
|
||||
description: Installs a specific Clang version. Useful if the GitHub runner does not have it by default.
|
||||
inputs:
|
||||
clang-version:
|
||||
description: The Clang major version to install
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install Clang
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-${{ inputs.clang-version }}
|
13
.github/workflows/build-tarball.yml
vendored
13
.github/workflows/build-tarball.yml
vendored
|
@ -30,8 +30,9 @@ concurrency:
|
|||
env:
|
||||
PYTHON_VERSION: '3.12'
|
||||
FLAKY_TESTS: keep_retrying
|
||||
CC: sccache clang
|
||||
CXX: sccache clang++
|
||||
CLANG_VERSION: '19'
|
||||
CC: sccache clang-19
|
||||
CXX: sccache clang++-19
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
|
||||
permissions:
|
||||
|
@ -45,6 +46,10 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
@ -75,6 +80,10 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
|
|
@ -36,8 +36,9 @@ concurrency:
|
|||
env:
|
||||
PYTHON_VERSION: '3.12'
|
||||
FLAKY_TESTS: keep_retrying
|
||||
CC: sccache clang
|
||||
CXX: sccache clang++
|
||||
CLANG_VERSION: '19'
|
||||
CC: sccache clang-19
|
||||
CXX: sccache clang++-19
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
|
||||
permissions:
|
||||
|
@ -51,6 +52,10 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
|
9
.github/workflows/coverage-linux.yml
vendored
9
.github/workflows/coverage-linux.yml
vendored
|
@ -36,8 +36,9 @@ concurrency:
|
|||
env:
|
||||
PYTHON_VERSION: '3.12'
|
||||
FLAKY_TESTS: keep_retrying
|
||||
CC: sccache clang
|
||||
CXX: sccache clang++
|
||||
CLANG_VERSION: '19'
|
||||
CC: sccache clang-19
|
||||
CXX: sccache clang++-19
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
|
||||
permissions:
|
||||
|
@ -51,6 +52,10 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
|
9
.github/workflows/test-internet.yml
vendored
9
.github/workflows/test-internet.yml
vendored
|
@ -33,8 +33,9 @@ concurrency:
|
|||
env:
|
||||
PYTHON_VERSION: '3.12'
|
||||
FLAKY_TESTS: keep_retrying
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CLANG_VERSION: '19'
|
||||
CC: clang-19
|
||||
CXX: clang++-19
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -47,6 +48,10 @@ jobs:
|
|||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
|
9
.github/workflows/test-linux.yml
vendored
9
.github/workflows/test-linux.yml
vendored
|
@ -27,8 +27,9 @@ concurrency:
|
|||
env:
|
||||
PYTHON_VERSION: '3.12'
|
||||
FLAKY_TESTS: keep_retrying
|
||||
CC: sccache clang
|
||||
CXX: sccache clang++
|
||||
CLANG_VERSION: '19'
|
||||
CC: sccache clang-19
|
||||
CXX: sccache clang++-19
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
|
||||
permissions:
|
||||
|
@ -47,6 +48,10 @@ jobs:
|
|||
with:
|
||||
persist-credentials: false
|
||||
path: node
|
||||
- name: Install Clang ${{ env.CLANG_VERSION }}
|
||||
uses: ./node/.github/actions/install-clang
|
||||
with:
|
||||
clang-version: ${{ env.CLANG_VERSION }}
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
|
|
|
@ -1236,8 +1236,8 @@ def check_compiler(o):
|
|||
print_verbose(f"Detected {'clang ' if is_clang else ''}C++ compiler (CXX={CXX}) version: {version_str}")
|
||||
if not ok:
|
||||
warn(f'failed to autodetect C++ compiler version (CXX={CXX})')
|
||||
elif clang_version < (8, 0, 0) if is_clang else gcc_version < (12, 2, 0):
|
||||
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 12.2.0 or clang++ 8.0.0')
|
||||
elif clang_version < (19, 1, 0) if is_clang else gcc_version < (12, 2, 0):
|
||||
warn(f'C++ compiler (CXX={CXX}, {version_str}) too old, need g++ 12.2.0 or clang++ 19.1.0')
|
||||
|
||||
ok, is_clang, clang_version, gcc_version = try_check_compiler(CC, 'c')
|
||||
version_str = ".".join(map(str, clang_version if is_clang else gcc_version))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue