Skip to content

Commit cf880ef

Browse files
authored
jenkins: select Clang compiler on Fedora (#4117)
Refs: #4091
1 parent 7abcb48 commit cf880ef

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

jenkins/scripts/select-compiler.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ if [ -z ${NODEJS_MAJOR_VERSION+x} ]; then
3333
NODEJS_MAJOR_VERSION="$(echo "$NODE_VERSION" | cut -d . -f 1)"
3434
fi
3535

36+
# Gradual transition to Clang from Node.js 25 (https://github.com/nodejs/build/issues/4091).
37+
if [ "$NODEJS_MAJOR_VERSION" -ge "25" ]; then
38+
case $NODE_NAME in
39+
*fedora*)
40+
echo "Using Clang for Node.js $NODEJS_MAJOR_VERSION"
41+
export CC="ccache clang"
42+
export CXX="ccache clang++"
43+
echo "Compiler set to Clang" `${CXX} -dumpversion`
44+
return
45+
;;
46+
esac
47+
fi
48+
3649
# Linux distros should be arch agnostic
3750
case $NODE_NAME in
3851
*rhel9*|*ubi9*)

0 commit comments

Comments
 (0)