Skip to content

Commit ac22dc0

Browse files
authored
Merge pull request swiftlang#46 from apple/shahmishal/support-newer-clang-centos7
Support newer Clang in CentOS 7
2 parents 8c507bd + 18488f6 commit ac22dc0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platforms/Linux/centos/7/build_rpm.sh

+3
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)