Skip to content

Commit 04caa63

Browse files
committed
Auto merge of #81565 - nikic:revert, r=nagisa
Revert dist-x86_64-linux update to Clang 11 This reverts commit cb6787a, reversing changes made to 0248c6f. The change causes errors when linking rustc shared objects with the binutils linker. Fixes #81554. r? `@Mark-Simulacrum`
2 parents fd20a8b + 8c7611c commit 04caa63

File tree

6 files changed

+12
-19
lines changed

6 files changed

+12
-19
lines changed

src/bootstrap/native.rs

+1-4
Original file line numberDiff line numberDiff 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_USE_LINKER", "lld");
204+
cfg.define("LLVM_ENABLE_LLD", "ON");
205205
}
206206
}
207207

@@ -556,9 +556,6 @@ 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-
}
562559
configure_cmake(builder, target, &mut cfg, true);
563560

564561
// This is an awful, awful hack. Discovered when we migrated to using

src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ RUN ./build-binutils.sh
6868
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
6969
RUN ./build-gcc.sh && apt-get remove -y gcc g++
7070

71-
# Debian 6 has Python 2.6 by default, but LLVM >= 12 needs Python 3
71+
# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+
7272
COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/
7373
RUN ./build-python.sh
7474

75-
# LLVM needs cmake 3.13.4 or higher
75+
# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4.
7676
COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/
7777
RUN ./build-cmake.sh
7878

@@ -94,10 +94,8 @@ 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 \
9997
--set rust.jemalloc
100-
ENV SCRIPT python3 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
98+
ENV SCRIPT python2.7 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
10199
ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang
102100

103101
# This was added when we switched from gcc to clang. It's not clear why this is

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

+3-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ RUN ./build-binutils.sh
6868
COPY host-x86_64/dist-x86_64-linux/build-gcc.sh /tmp/
6969
RUN ./build-gcc.sh && apt-get remove -y gcc g++
7070

71-
# Debian 6 has Python 2.6 by default, but LLVM >= 12 needs Python 3
71+
# Debian 6 has Python 2.6 by default, but LLVM needs 2.7+
7272
COPY host-x86_64/dist-x86_64-linux/build-python.sh /tmp/
7373
RUN ./build-python.sh
7474

75-
# LLVM needs cmake 3.13.4 or higher
75+
# LLVM needs cmake 3.4.3 or higher, and is planning to raise to 3.13.4.
7676
COPY host-x86_64/dist-x86_64-linux/build-cmake.sh /tmp/
7777
RUN ./build-cmake.sh
7878

@@ -99,10 +99,8 @@ 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 \
104102
--set rust.jemalloc
105-
ENV SCRIPT ../src/ci/pgo.sh python3 ../x.py dist \
103+
ENV SCRIPT ../src/ci/pgo.sh python2.7 ../x.py dist \
106104
--host $HOSTS --target $HOSTS \
107105
--include-default-paths \
108106
src/tools/build-manifest

src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -ex
44

55
source shared.sh
66

7-
LLVM=llvmorg-11.0.1
7+
LLVM=llvmorg-10.0.0
88

99
mkdir llvm-project
1010
cd llvm-project

src/ci/docker/host-x86_64/dist-x86_64-linux/build-python.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -ex
44
source shared.sh
55

6-
curl https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz | \
6+
curl https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | \
77
tar xzf -
88

99
mkdir 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.
1414
CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \
15-
hide_output ../Python-3.9.1/configure --prefix=/rustroot
15+
hide_output ../Python-2.7.12/configure --prefix=/rustroot
1616
hide_output make -j10
1717
hide_output make install
1818

1919
cd ..
2020
rm -rf python-build
21-
rm -rf Python-3.9.1
21+
rm -rf Python-2.7.12

src/ci/pgo.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euxo pipefail
44

55
rm -rf /tmp/rustc-pgo
66

7-
python3 ../x.py build --target=$PGO_HOST --host=$PGO_HOST \
7+
python2.7 ../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 \

0 commit comments

Comments
 (0)