Skip to content

Commit 3cc5057

Browse files
authored
ansible: install Clang on RHEL hosts (#4123)
Refs: #4091
1 parent 53f8b18 commit 3cc5057

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

ansible/roles/baselayout/vars/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ packages: {
8585
],
8686

8787
rhel8: [
88-
'ccache,cmake,gcc-c++,gcc-toolset-10,gcc-toolset-10-libatomic-devel,gcc-toolset-11,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,git,make,python3',
88+
'ccache,clang,cmake,gcc-c++,gcc-toolset-10,gcc-toolset-10-libatomic-devel,gcc-toolset-11,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,make,python3',
8989
],
9090

9191
rhel9: [
92-
'ccache,cmake,gcc-c++,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,git,make,python3',
92+
'ccache,clang,cmake,gcc-c++,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,make,python3',
9393
],
9494

9595
smartos: [

ansible/roles/docker/templates/rhel8.Dockerfile.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN dnf install --disableplugin=subscription-manager -y \
1818
&& dnf update --disableplugin=subscription-manager -y \
1919
&& dnf install --disableplugin=subscription-manager -y \
2020
ccache \
21+
clang \
2122
gcc-c++ \
2223
gcc-toolset-12 \
2324
git \
@@ -30,6 +31,7 @@ RUN dnf install --disableplugin=subscription-manager -y \
3031
&& dnf --disableplugin=subscription-manager clean all
3132

3233
RUN dnf install --disableplugin=subscription-manager -y \
34+
https://repo.almalinux.org/almalinux/8/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-14-libatomic-devel-14.2.1-1.1.el8_10.{{ ansible_architecture }}.rpm \
3335
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-binutils-2.35-11.el8.{{ ansible_architecture }}.rpm \
3436
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-gcc-10.3.1-1.2.el8_5.{{ ansible_architecture }}.rpm \
3537
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-gcc-c++-10.3.1-1.2.el8_5.{{ ansible_architecture }}.rpm \

ansible/roles/docker/templates/ubi81.Dockerfile.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN dnf install --disableplugin=subscription-manager -y \
1818
&& dnf update --disableplugin=subscription-manager -y \
1919
&& dnf install --disableplugin=subscription-manager -y \
2020
ccache \
21+
clang \
2122
gcc-c++ \
2223
gcc-toolset-12 \
2324
git \
@@ -30,6 +31,7 @@ RUN dnf install --disableplugin=subscription-manager -y \
3031
&& dnf --disableplugin=subscription-manager clean all
3132

3233
RUN dnf install --disableplugin=subscription-manager -y \
34+
https://repo.almalinux.org/almalinux/8/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-14-libatomic-devel-14.2.1-1.1.el8_10.{{ ansible_architecture }}.rpm \
3335
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-binutils-2.35-11.el8.{{ ansible_architecture }}.rpm \
3436
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-gcc-10.3.1-1.2.el8_5.{{ ansible_architecture }}.rpm \
3537
http://vault.centos.org/centos/8-stream/AppStream/{{ ansible_architecture }}/os/Packages/gcc-toolset-10-gcc-c++-10.3.1-1.2.el8_5.{{ ansible_architecture }}.rpm \

jenkins/scripts/select-compiler.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ if [ "$NODEJS_MAJOR_VERSION" -ge "25" ]; then
5050
echo "Compiler set to Clang" `${CXX} -dumpversion`
5151
return
5252
;;
53+
*rhel*|*ubi*)
54+
echo "Using Clang for Node.js $NODEJS_MAJOR_VERSION"
55+
export CC="ccache clang"
56+
export CXX="ccache clang++"
57+
echo "Compiler set to Clang" `${CXX} -dumpversion`
58+
return
59+
;;
5360
esac
5461
fi
5562

0 commit comments

Comments
 (0)