Skip to content

Commit ddab10a

Browse files
committed
Auto merge of #56892 - alexcrichton:new-llvm, r=michaelwoerister
rustc: Update Clang used to build LLVM on Linux This commit updates from LLVM 7.0.0 to git revisions of clang/llvm/lld to build LLVM on our dist builders for Linux. The goal of this is to fix #56849 by picking up a fix [1] in LLD. Closes #56849 [1]: llvm-mirror/lld@3be4e82
2 parents 16329b0 + bbce189 commit ddab10a

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

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

+14-17
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,28 @@ set -ex
1313

1414
source shared.sh
1515

16-
LLVM=7.0.0
16+
# Currently these commits are all tip-of-tree as of 2018-12-16, used to pick up
17+
# a fix for rust-lang/rust#56849
18+
LLVM=032b00a5404865765cda7db3039f39d54964d8b0
19+
LLD=3e4aa4e8671523321af51449e0569f455ef3ad43
20+
CLANG=a6b9739069763243020f4ea6fe586bc135fde1f9
1721

1822
mkdir clang
1923
cd clang
2024

21-
curl https://releases.llvm.org/$LLVM/llvm-$LLVM.src.tar.xz | \
22-
xz -d | \
23-
tar xf -
24-
25-
cd llvm-$LLVM.src
25+
curl -L https://github.com/llvm-mirror/llvm/archive/$LLVM.tar.gz | \
26+
tar xzf - --strip-components=1
2627

2728
mkdir -p tools/clang
28-
29-
curl https://releases.llvm.org/$LLVM/cfe-$LLVM.src.tar.xz | \
30-
xz -d | \
31-
tar xf - -C tools/clang --strip-components=1
29+
curl -L https://github.com/llvm-mirror/clang/archive/$CLANG.tar.gz | \
30+
tar xzf - --strip-components=1 -C tools/clang
3231

3332
mkdir -p tools/lld
33+
curl -L https://github.com/llvm-mirror/lld/archive/$LLD.tar.gz | \
34+
tar zxf - --strip-components=1 -C tools/lld
3435

35-
curl https://releases.llvm.org/$LLVM/lld-$LLVM.src.tar.xz | \
36-
xz -d | \
37-
tar xf - -C tools/lld --strip-components=1
38-
39-
mkdir ../clang-build
40-
cd ../clang-build
36+
mkdir clang-build
37+
cd clang-build
4138

4239
# For whatever reason the default set of include paths for clang is different
4340
# than that of gcc. As a result we need to manually include our sysroot's
@@ -55,7 +52,7 @@ INC="$INC:/rustroot/lib/gcc/x86_64-unknown-linux-gnu/4.8.5/include-fixed"
5552
INC="$INC:/usr/include"
5653

5754
hide_output \
58-
cmake ../llvm-$LLVM.src \
55+
cmake .. \
5956
-DCMAKE_C_COMPILER=/rustroot/bin/gcc \
6057
-DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \
6158
-DCMAKE_BUILD_TYPE=Release \

0 commit comments

Comments
 (0)