about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-11-07 09:00:25 -0800
committerAlex Crichton <alex@alexcrichton.com>2019-11-07 13:06:56 -0800
commit1e4c2ae622549108a55fcbdaeffdbf6d56ace3ac (patch)
treecb3e9998d43d9fb59df11cf320e0fcb0f2f48d53 /src/ci/docker
parent50f8aadd746ebc929a752e5ffb133936ee75c52f (diff)
downloadrust-1e4c2ae622549108a55fcbdaeffdbf6d56ace3ac.tar.gz
rust-1e4c2ae622549108a55fcbdaeffdbf6d56ace3ac.zip
Update clang to build LLVM to 9.0.0
This also ensure that we're using the same clang version for all our
major platforms instead of 8.0 on Linux and 7.0 on OSX/Windows.
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/dist-i686-linux/Dockerfile2
-rw-r--r--src/ci/docker/dist-x86_64-linux/Dockerfile2
-rwxr-xr-xsrc/ci/docker/dist-x86_64-linux/build-clang.sh5
-rw-r--r--src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch18
4 files changed, 24 insertions, 3 deletions
diff --git a/src/ci/docker/dist-i686-linux/Dockerfile b/src/ci/docker/dist-i686-linux/Dockerfile
index b087ea7899f..ad675830b77 100644
--- a/src/ci/docker/dist-i686-linux/Dockerfile
+++ b/src/ci/docker/dist-i686-linux/Dockerfile
@@ -69,7 +69,7 @@ RUN ./build-python.sh
 
 # Now build LLVM+Clang 7, afterwards configuring further compilations to use the
 # clang/clang++ compilers.
-COPY dist-x86_64-linux/build-clang.sh /tmp/
+COPY dist-x86_64-linux/build-clang.sh dist-x86_64-linux/llvm-project-centos.patch /tmp/
 RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
diff --git a/src/ci/docker/dist-x86_64-linux/Dockerfile b/src/ci/docker/dist-x86_64-linux/Dockerfile
index a1a778c2b2c..2f2a10a0e90 100644
--- a/src/ci/docker/dist-x86_64-linux/Dockerfile
+++ b/src/ci/docker/dist-x86_64-linux/Dockerfile
@@ -69,7 +69,7 @@ RUN ./build-python.sh
 
 # Now build LLVM+Clang 7, afterwards configuring further compilations to use the
 # clang/clang++ compilers.
-COPY dist-x86_64-linux/build-clang.sh /tmp/
+COPY dist-x86_64-linux/build-clang.sh dist-x86_64-linux/llvm-project-centos.patch /tmp/
 RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
diff --git a/src/ci/docker/dist-x86_64-linux/build-clang.sh b/src/ci/docker/dist-x86_64-linux/build-clang.sh
index ac681b71686..518f6ef9b70 100755
--- a/src/ci/docker/dist-x86_64-linux/build-clang.sh
+++ b/src/ci/docker/dist-x86_64-linux/build-clang.sh
@@ -4,7 +4,7 @@ set -ex
 
 source shared.sh
 
-LLVM=llvmorg-8.0.0-rc2
+LLVM=llvmorg-9.0.0
 
 mkdir llvm-project
 cd llvm-project
@@ -12,6 +12,9 @@ cd llvm-project
 curl -L https://github.com/llvm/llvm-project/archive/$LLVM.tar.gz | \
   tar xzf - --strip-components=1
 
+yum install -y patch
+patch -Np1 < ../llvm-project-centos.patch
+
 mkdir clang-build
 cd clang-build
 
diff --git a/src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch b/src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch
new file mode 100644
index 00000000000..52650062cc4
--- /dev/null
+++ b/src/ci/docker/dist-x86_64-linux/llvm-project-centos.patch
@@ -0,0 +1,18 @@
+diff --git a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
+index 176d6d6abf3..a6d63bf24b8 100644
+--- a/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
++++ b/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
+@@ -33,6 +33,13 @@ namespace {
+ using namespace llvm;
+ using namespace clang;
+ 
++#define EPOLL_CLOEXEC -1
++#define IN_CLOEXEC -1
++#define O_CLOEXEC -1
++static int epoll_create1(int flags) { return -1; }
++static int inotify_init1(int flags) { return -1; }
++static int pipe2(int *fds, int flags) { return -1; }
++
+ /// Pipe for inter-thread synchronization - for epoll-ing on multiple
+ /// conditions. It is meant for uni-directional 1:1 signalling - specifically:
+ /// no multiple consumers, no data passing. Thread waiting for signal should