From 1fa1e4bb9f71ca9df4cc4b46162d9f47826bbd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Thu, 7 Aug 2025 09:37:16 +0200 Subject: [PATCH] jenkins: select Clang compiler on Fedora Refs: https://github.com/nodejs/build/issues/4091 --- jenkins/scripts/select-compiler.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jenkins/scripts/select-compiler.sh b/jenkins/scripts/select-compiler.sh index bef544b6c..6b18ebc05 100644 --- a/jenkins/scripts/select-compiler.sh +++ b/jenkins/scripts/select-compiler.sh @@ -33,6 +33,19 @@ if [ -z ${NODEJS_MAJOR_VERSION+x} ]; then NODEJS_MAJOR_VERSION="$(echo "$NODE_VERSION" | cut -d . -f 1)" fi +# Gradual transition to Clang from Node.js 25 (https://github.com/nodejs/build/issues/4091). +if [ "$NODEJS_MAJOR_VERSION" -ge "25" ]; then + case $NODE_NAME in + *fedora*) + echo "Using Clang for Node.js $NODEJS_MAJOR_VERSION" + export CC="ccache clang" + export CXX="ccache clang++" + echo "Compiler set to Clang" `${CXX} -dumpversion` + return + ;; + esac +fi + # Linux distros should be arch agnostic case $NODE_NAME in *rhel9*|*ubi9*)