File tree Expand file tree Collapse file tree 6 files changed +19
-12
lines changed Expand file tree Collapse file tree 6 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ impl Step for Llvm {
201201 if builder. config . llvm_thin_lto {
202202 cfg. define ( "LLVM_ENABLE_LTO" , "Thin" ) ;
203203 if !target. contains ( "apple" ) {
204- cfg. define ( "LLVM_ENABLE_LLD " , "ON " ) ;
204+ cfg. define ( "LLVM_USE_LINKER " , "lld " ) ;
205205 }
206206 }
207207
@@ -556,6 +556,9 @@ impl Step for Lld {
556556 t ! ( fs:: create_dir_all( & out_dir) ) ;
557557
558558 let mut cfg = cmake:: Config :: new ( builder. src . join ( "src/llvm-project/lld" ) ) ;
559+ if let Some ( ref linker) = builder. config . llvm_use_linker {
560+ cfg. define ( "LLVM_USE_LINKER" , linker) ;
561+ }
559562 configure_cmake ( builder, target, & mut cfg, true ) ;
560563
561564 // This is an awful, awful hack. Discovered when we migrated to using
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ RUN ./build-binutils.sh
6868COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
6969RUN ./build-gcc.sh && apt-get remove -y gcc g++
7070
71- # Debian 6 has Python 2.6 by default, but LLVM needs 2.7+
71+ # Debian 6 has Python 2.6 by default, but LLVM >= 12 needs Python 3
7272COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/
7373RUN ./build-python.sh
7474
75- # LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4.
75+ # LLVM needs cmake 3.13.4 or higher
7676COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/
7777RUN ./build-cmake.sh
7878
@@ -94,8 +94,10 @@ ENV RUST_CONFIGURE_ARGS \
9494 --set target.i686-unknown-linux-gnu.linker=clang \
9595 --build=i686-unknown-linux-gnu \
9696 --set llvm.ninja=false \
97+ --set llvm.use-linker=lld \
98+ --set rust.use-lld=true \
9799 --set rust.jemalloc
98- ENV SCRIPT python2.7 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
100+ ENV SCRIPT python3 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
99101ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang
100102
101103# This was added when we switched from gcc to clang. It's not clear why this is
Original file line number Diff line number Diff line change @@ -68,11 +68,11 @@ RUN ./build-binutils.sh
6868COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
6969RUN ./build-gcc.sh && apt-get remove -y gcc g++
7070
71- # Debian 6 has Python 2.6 by default, but LLVM needs 2.7+
71+ # Debian 6 has Python 2.6 by default, but LLVM >= 12 needs Python 3
7272COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/
7373RUN ./build-python.sh
7474
75- # LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4.
75+ # LLVM needs cmake 3.13.4 or higher
7676COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/
7777RUN ./build-cmake.sh
7878
@@ -99,8 +99,10 @@ ENV RUST_CONFIGURE_ARGS \
9999 --set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
100100 --set llvm.thin-lto=true \
101101 --set llvm.ninja=false \
102+ --set llvm.use-linker=lld \
103+ --set rust.use-lld=true \
102104 --set rust.jemalloc
103- ENV SCRIPT ../src/ci/pgo.sh python2.7 ../x.py dist \
105+ ENV SCRIPT ../src/ci/pgo.sh python3 ../x.py dist \
104106 --host $HOSTS --target $HOSTS \
105107 --include-default-paths \
106108 src/tools/build-manifest
Original file line number Diff line number Diff line change 44
55source shared.sh
66
7- LLVM=llvmorg-10 .0.0
7+ LLVM=llvmorg-11 .0.1
88
99mkdir llvm-project
1010cd llvm-project
Original file line number Diff line number Diff line change 33set -ex
44source shared.sh
55
6- curl https://www.python.org/ftp/python/2.7.12 /Python-2.7.12 .tgz | \
6+ curl https://www.python.org/ftp/python/3.9.1 /Python-3.9.1 .tgz | \
77 tar xzf -
88
99mkdir python-build
@@ -12,10 +12,10 @@ cd python-build
1212# Gotta do some hackery to tell python about our custom OpenSSL build, but other
1313# than that fairly normal.
1414CFLAGS=' -I /rustroot/include' LDFLAGS=' -L /rustroot/lib -L /rustroot/lib64' \
15- hide_output ../Python-2.7.12 /configure --prefix=/rustroot
15+ hide_output ../Python-3.9.1 /configure --prefix=/rustroot
1616hide_output make -j10
1717hide_output make install
1818
1919cd ..
2020rm -rf python-build
21- rm -rf Python-2.7.12
21+ rm -rf Python-3.9.1
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -euxo pipefail
44
55rm -rf /tmp/rustc-pgo
66
7- python2.7 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
7+ python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
88 --stage 2 library/std --rust-profile-generate=/tmp/rustc-pgo
99
1010./build/$PGO_HOST /stage2/bin/rustc --edition=2018 \
You can’t perform that action at this time.
0 commit comments