Skip to content

Commit 18488f6

Browse files
authored
Support newer Clang in CentOS 7
``` [swift/utils/build-script] ERROR: can't find clang (please install clang-3.5 or a later version) ERROR: command terminated with a non-zero exit status 1, aborting ``` We were missing these two steps from CentOS 7 Dockerfile: ``` RUN echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> /home/build-user/.bashrc RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h ```
1 parent 8c507bd commit 18488f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platforms/Linux/centos/7/build_rpm.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ cp patches/*.patch $HOME/rpmbuild/SOURCES/
3232
pushd $HOME/rpmbuild/SPECS
3333
# install all the dependencies needed to build Swift from the spec file itself
3434
yum-builddep -y ./swift-lang.spec
35+
# Workaround to support clang-3.5 or a later version
36+
echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> $HOME/.bashrc
37+
sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
3538
# get the sources for Swift as defined in the spec file
3639
spectool -g -R ./swift-lang.spec
3740
# Now we proceed to build Swift. If this is successful, we

0 commit comments

Comments
 (0)