Skip to content

Commit dbf1130

Browse files
committed
Update to Rust 1.86.0
1 parent 6ff7c3f commit dbf1130

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

common.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2022-2025 Google LLC.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
RUST_VERSION='1.85.0'
4+
RUST_VERSION='1.86.0'
55

66
NDK_VERSION='r29-beta1'
77
NDK_DIR_VERSION=$NDK_VERSION
@@ -13,7 +13,7 @@ LLVM_SVN='547379'
1313
LLVM_ANDROID_VERSION='456a459bd653ddf1cca170e7e9aef9d122a81731'
1414
TOOLCHAIN_UTILS_VERSION='a1bb7f26cc6b735c3d685db12739bb03ad9a2993'
1515

16-
OUTPUT_VERSION='r29.0'
16+
OUTPUT_VERSION='r29.1'
1717

1818
PYTHON_CMD='python3'
1919

@@ -63,8 +63,7 @@ git_clone_branch() {
6363
}
6464

6565
skip_submodule() {
66-
sed "s:.*submodule.*$1.*:&\n\tupdate = none:" .gitmodules > .gitmodules.p
67-
mv .gitmodules.p .gitmodules
66+
git config set -f .gitmodules "submodule.$1.update" none
6867
}
6968

7069
clone_llvm() {
@@ -88,10 +87,9 @@ clone_rust() {
8887
cd src/rust
8988

9089
# Skip unused submodules
91-
skip_submodule llvm-project
92-
skip_submodule enzyme
93-
skip_submodule gcc
94-
skip_submodule doc
90+
skip_submodule src/llvm-project
91+
skip_submodule src/gcc
92+
skip_submodule src/tools/enzyme
9593

9694
# Clone submodules
9795
git submodule update --init --depth=1

config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
change-id = 134650
1+
change-id = 136941
22

33
[llvm]
44
targets = "AArch64;ARM;X86;RISCV"
@@ -19,8 +19,8 @@ tools = [
1919
"cargo",
2020
"src",
2121
"clippy",
22-
"rust-analyzer",
2322
"rustfmt",
23+
"rust-analyzer",
2424
"rust-analyzer-proc-macro-srv",
2525
]
2626
cargo-native-static = true

patches/patch_llvm_build.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs
2-
index be5b4057..da2b5054 100644
2+
index 18da0e82..6c44509e 100644
33
--- a/src/bootstrap/src/core/build_steps/llvm.rs
44
+++ b/src/bootstrap/src/core/build_steps/llvm.rs
5-
@@ -308,7 +308,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
5+
@@ -329,7 +329,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
66
LlvmBuildStatus::ShouldBuild(m) => m,
77
};
88

@@ -11,7 +11,7 @@ index be5b4057..da2b5054 100644
1111
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
1212
}
1313

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

@@ -21,7 +21,7 @@ index be5b4057..da2b5054 100644
2121
// We want libxml to be disabled.
2222
// See https://github.com/rust-lang/rust/pull/50104
2323
cfg.define("LLVM_ENABLE_LIBXML2", "OFF");
24-
@@ -567,7 +570,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
24+
@@ -585,7 +588,7 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
2525
// link to make llvm-config happy.
2626
if builder.llvm_link_shared() && target.contains("apple-darwin") {
2727
let lib_name = find_llvm_lib_name("dylib");

patches/support_ndk_llvm.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
2-
index 628c0b1c..f9cc304b 100644
2+
index b4b5d6a5..05f1d4b4 100644
33
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
44
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
5-
@@ -255,8 +255,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
5+
@@ -258,8 +258,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
66
("aarch64", "pacg") => Some(LLVMFeature::new("pauth")),
77
("aarch64", "pauth-lr") if get_version().0 < 19 => None,
88
// Before LLVM 20 those two features were packaged together as b16b16
@@ -28,10 +28,10 @@ index f6598f9f..b2c78565 100644
2828

2929
enum class LLVMRustResult { Success, Failure };
3030
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
31-
index de14c6d1..78e04c1f 100644
31+
index a6b2384f..0bc639a4 100644
3232
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
3333
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
34-
@@ -1620,7 +1620,7 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
34+
@@ -1632,7 +1632,7 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
3535
const auto &ExportList = Data->ExportLists.lookup(ModId);
3636
const auto &ResolvedODR = Data->ResolvedODR.lookup(ModId);
3737
const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(ModId);
@@ -40,7 +40,7 @@ index de14c6d1..78e04c1f 100644
4040
DenseSet<GlobalValue::GUID> CfiFunctionDefs;
4141
DenseSet<GlobalValue::GUID> CfiFunctionDecls;
4242
#else
43-
@@ -1636,7 +1636,7 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
43+
@@ -1648,7 +1648,7 @@ extern "C" void LLVMRustComputeLTOCacheKey(RustStringRef KeyOut,
4444
CfiFunctionDecls.insert(
4545
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(Name)));
4646

0 commit comments

Comments
 (0)