@@ -29,7 +29,7 @@ ENV PATH=/rustroot/bin:$PATH
2929ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
3030ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
3131WORKDIR /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/
3333
3434# We need a build of openssl which supports SNI to download artifacts from
3535# static.rust-lang.org. This'll be used to link into libcurl below (and used
@@ -51,26 +51,33 @@ RUN ./build-curl.sh
5151# immediately segfault in Rust, so we need to install our own binutils.
5252#
5353# See https://github.com/rust-lang/rust/issues/20440 for more info
54+ COPY dist-x86_64-linux/build-binutils.sh /tmp/
5455RUN ./build-binutils.sh
5556
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
5763COPY dist-x86_64-linux/build-gcc.sh /tmp/
5864RUN ./build-gcc.sh
5965
6066# CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
6167COPY dist-x86_64-linux/build-python.sh /tmp/
6268RUN ./build-python.sh
6369
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+
6476# Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
6577# cloning, so download and build it here.
6678COPY dist-x86_64-linux/build-git.sh /tmp/
6779RUN ./build-git.sh
6880
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-
7481# for sanitizers, we need kernel headers files newer than the ones CentOS ships
7582# with so we install newer ones here
7683COPY dist-x86_64-linux/build-headers.sh /tmp/
@@ -85,8 +92,9 @@ ENV RUST_CONFIGURE_ARGS \
8592 --enable-full-tools \
8693 --enable-sanitizers \
8794 --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
9098
9199# This is the only builder which will create source tarballs
92100ENV DIST_SRC 1
0 commit comments