Skip to content

Commit 1e1f4e2

Browse files
committed
Change how LLVM is being built
1 parent b6d9cce commit 1e1f4e2

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

build.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ collect() {
6161
find . -name '*.old' -delete
6262
cp -af ../rust/build/$TRIPLE/llvm/bin llvm-bin
6363
find ../rust/build/$TRIPLE/llvm/lib -name "*.${DYN_EXT}*" -exec cp -an {} lib \;
64-
local lib_llvm="libLLVM.${DYN_EXT}"
65-
if [ -L "lib/$lib_llvm" ]; then
66-
lib_llvm=$(readlink "lib/$lib_llvm")
67-
fi
68-
ln -s ../../../$lib_llvm lib/rustlib/$TRIPLE/lib/$lib_llvm
6964
strip_exe llvm-bin/llvm-strip
7065
cd ..
7166
}

config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ sysconfdir = "etc"
3232
[rust]
3333
channel = "nightly"
3434
lto = "thin"
35-
lld = true
36-
llvm-tools = true
35+
lld = false
3736
strip = true
3837
codegen-units = 1
3938

patches/patch_llvm_build.patch

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
2-
index be5b4057..d053add5 100644
2+
index be5b4057..da2b5054 100644
33
--- a/src/bootstrap/src/core/build_steps/llvm.rs
44
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
55
@@ -308,7 +308,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
@@ -11,18 +11,17 @@ index be5b4057..d053add5 100644
1111
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
1212
}
1313

14-
@@ -463,6 +463,10 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
14+
@@ -463,6 +463,9 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
1515
enabled_llvm_projects.push("clang");
1616
}
1717

18-
+ if builder.config.lld_enabled {
19-
+ enabled_llvm_projects.push("lld");
20-
+ }
18+
+ // ONDK change: always enable lld
19+
+ enabled_llvm_projects.push("lld");
2120
+
2221
// We want libxml to be disabled.
2322
// See https://github.com/rust-lang/rust/pull/50104
2423
cfg.define("LLVM_ENABLE_LIBXML2", "OFF");
25-
@@ -567,7 +571,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
24+
@@ -567,7 +570,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
2625
// link to make llvm-config happy.
2726
if builder.llvm_link_shared() && target.contains("apple-darwin") {
2827
let lib_name = find_llvm_lib_name("dylib");

0 commit comments

Comments
 (0)