@@ -29,7 +29,7 @@ ENV PATH=/rustroot/bin:$PATH
29
29
ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
30
30
ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
31
31
WORKDIR /tmp
32
- COPY dist-x86_64-linux/shared.sh dist-x86_64-linux/build-binutils.sh /tmp/
32
+ COPY dist-x86_64-linux/shared.sh /tmp/
33
33
34
34
# We need a build of openssl which supports SNI to download artifacts from
35
35
# static.rust-lang.org. This'll be used to link into libcurl below (and used
@@ -51,26 +51,33 @@ RUN ./build-curl.sh
51
51
# immediately segfault in Rust, so we need to install our own binutils.
52
52
#
53
53
# See https://github.com/rust-lang/rust/issues/20440 for more info
54
+ COPY dist-x86_64-linux/build-binutils.sh /tmp/
54
55
RUN ./build-binutils.sh
55
56
56
- # Need a newer version of gcc than centos has to compile LLVM nowadays
57
+ # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
58
+ # only has 2.6.4, so build our own
59
+ COPY dist-x86_64-linux/build-cmake.sh /tmp/
60
+ RUN ./build-cmake.sh
61
+
62
+ # Build a version of gcc capable of building LLVM 6
57
63
COPY dist-x86_64-linux/build-gcc.sh /tmp/
58
64
RUN ./build-gcc.sh
59
65
60
66
# CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
61
67
COPY dist-x86_64-linux/build-python.sh /tmp/
62
68
RUN ./build-python.sh
63
69
70
+ # Now build LLVM+Clang 6, afterwards configuring further compilations to use the
71
+ # clang/clang++ compilers.
72
+ COPY dist-x86_64-linux/build-clang.sh /tmp/
73
+ RUN ./build-clang.sh
74
+ ENV CC=clang CXX=clang++
75
+
64
76
# Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
65
77
# cloning, so download and build it here.
66
78
COPY dist-x86_64-linux/build-git.sh /tmp/
67
79
RUN ./build-git.sh
68
80
69
- # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
70
- # only has 2.6.4, so build our own
71
- COPY dist-x86_64-linux/build-cmake.sh /tmp/
72
- RUN ./build-cmake.sh
73
-
74
81
# for sanitizers, we need kernel headers files newer than the ones CentOS ships
75
82
# with so we install newer ones here
76
83
COPY dist-x86_64-linux/build-headers.sh /tmp/
@@ -85,8 +92,9 @@ ENV RUST_CONFIGURE_ARGS \
85
92
--enable-full-tools \
86
93
--enable-sanitizers \
87
94
--enable-profiler \
88
- --enable-compiler-docs
89
- ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
95
+ --enable-compiler-docs \
96
+ --set target.x86_64-unknown-linux-gnu.linker=clang
97
+ ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS -v
90
98
91
99
# This is the only builder which will create source tarballs
92
100
ENV DIST_SRC 1
0 commit comments