Skip to content

Commit 604f185

Browse files
committed
Auto merge of #118936 - nikic:update-llvm-18, r=cuviper
Update to LLVM 17.0.6 This is a rebase on the final LLVM 17 release. Includes the RISCV fix requested in rust-lang/llvm-project#157 (and I think this is also the only change in this release that is relevant to rustc). r? `@cuviper` Fixes #117902
2 parents 03515c6 + 601d52a commit 604f185

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

Diff for: .gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
[submodule "src/llvm-project"]
3434
path = src/llvm-project
3535
url = https://github.com/rust-lang/llvm-project.git
36-
branch = rustc/17.0-2023-09-19
36+
branch = rustc/17.0-2023-12-14
3737
shallow = true
3838
[submodule "src/doc/embedded-book"]
3939
path = src/doc/embedded-book

Diff for: src/bootstrap/src/core/config/config.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,7 @@ impl Config {
17951795
config.llvm_link_shared.set(Some(true));
17961796
}
17971797
} else {
1798-
config.llvm_from_ci = config.channel == "dev"
1799-
&& crate::core::build_steps::llvm::is_ci_llvm_available(&config, false);
1798+
config.llvm_from_ci = config.parse_download_ci_llvm(None, false);
18001799
}
18011800

18021801
if let Some(t) = toml.target {
@@ -2341,29 +2340,30 @@ impl Config {
23412340
download_ci_llvm: Option<StringOrBool>,
23422341
asserts: bool,
23432342
) -> bool {
2343+
let if_unchanged = || {
2344+
// Git is needed to track modifications here, but tarball source is not available.
2345+
// If not modified here or built through tarball source, we maintain consistency
2346+
// with '"if available"'.
2347+
if !self.rust_info.is_from_tarball()
2348+
&& self
2349+
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
2350+
.is_none()
2351+
{
2352+
// there are some untracked changes in the the given paths.
2353+
false
2354+
} else {
2355+
llvm::is_ci_llvm_available(&self, asserts)
2356+
}
2357+
};
23442358
match download_ci_llvm {
2345-
None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
2359+
None => self.channel == "dev" && if_unchanged(),
23462360
Some(StringOrBool::Bool(b)) => b,
23472361
// FIXME: "if-available" is deprecated. Remove this block later (around mid 2024)
23482362
// to not break builds between the recent-to-old checkouts.
23492363
Some(StringOrBool::String(s)) if s == "if-available" => {
23502364
llvm::is_ci_llvm_available(&self, asserts)
23512365
}
2352-
Some(StringOrBool::String(s)) if s == "if-unchanged" => {
2353-
// Git is needed to track modifications here, but tarball source is not available.
2354-
// If not modified here or built through tarball source, we maintain consistency
2355-
// with '"if available"'.
2356-
if !self.rust_info.is_from_tarball()
2357-
&& self
2358-
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
2359-
.is_none()
2360-
{
2361-
// there are some untracked changes in the the given paths.
2362-
false
2363-
} else {
2364-
llvm::is_ci_llvm_available(&self, asserts)
2365-
}
2366-
}
2366+
Some(StringOrBool::String(s)) if s == "if-unchanged" => if_unchanged(),
23672367
Some(StringOrBool::String(other)) => {
23682368
panic!("unrecognized option for download-ci-llvm: {:?}", other)
23692369
}

Diff for: src/bootstrap/src/tests/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ fn download_ci_llvm() {
3131
assert_eq!(parse_llvm(""), if_unchanged);
3232
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_unchanged);
3333
assert!(!parse_llvm("rust.channel = \"stable\""));
34-
assert!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""));
35-
assert!(parse_llvm(
34+
assert_eq!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""), if_unchanged);
35+
assert_eq!(parse_llvm(
3636
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
37-
));
37+
), if_unchanged);
3838
assert!(!parse_llvm(
3939
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
4040
));

Diff for: src/llvm-project

Submodule llvm-project updated 47 files

0 commit comments

Comments
 (0)