diff --git a/.github/actions/install-clang/action.yml b/.github/actions/install-clang/action.yml new file mode 100644 index 00000000000000..765ad07ef3cdb9 --- /dev/null +++ b/.github/actions/install-clang/action.yml @@ -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 }} diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index c5911684070fba..21dbb3ec801bf9 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -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: diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index c30ae78e303e07..a6512568d8bdfa 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -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: diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 6d5afb489762e4..9a01f3716bda0b 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -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: diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index 7d25113c024f78..9943ad3352d1da 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -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: diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 789689c25cd4bf..8cf2495ab7cc95 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -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: diff --git a/common.gypi b/common.gypi index e89330a1045d0c..7e3a6da67b2ddd 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.16', + 'v8_embedder_string': '-node.17', ##### V8 defaults for Node.js ##### diff --git a/configure.py b/configure.py index 0191f75d064d99..79d2e6709c98f1 100755 --- a/configure.py +++ b/configure.py @@ -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)) diff --git a/deps/v8/include/v8-persistent-handle.h b/deps/v8/include/v8-persistent-handle.h index 6abe29d4ab782f..25e77acc11dfde 100644 --- a/deps/v8/include/v8-persistent-handle.h +++ b/deps/v8/include/v8-persistent-handle.h @@ -488,9 +488,16 @@ V8_INLINE void PersistentBase::SetWeak( #if (__GNUC__ >= 8) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-function-type" +#endif +#if __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" #endif api_internal::MakeWeak(this->slot(), parameter, reinterpret_cast(callback), type); +#if __clang__ +#pragma clang diagnostic pop +#endif #if (__GNUC__ >= 8) && !defined(__clang__) #pragma GCC diagnostic pop #endif