Skip to content

Commit

Permalink
Auto merge of rust-lang#118936 - nikic:update-llvm-18, r=cuviper
Browse files Browse the repository at this point in the history
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 rust-lang#117902
  • Loading branch information
bors committed Dec 15, 2023
2 parents 03515c6 + 601d52a commit 604f185
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/17.0-2023-09-19
branch = rustc/17.0-2023-12-14
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
36 changes: 18 additions & 18 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1795,8 +1795,7 @@ impl Config {
config.llvm_link_shared.set(Some(true));
}
} else {
config.llvm_from_ci = config.channel == "dev"
&& crate::core::build_steps::llvm::is_ci_llvm_available(&config, false);
config.llvm_from_ci = config.parse_download_ci_llvm(None, false);
}

if let Some(t) = toml.target {
Expand Down Expand Up @@ -2341,29 +2340,30 @@ impl Config {
download_ci_llvm: Option<StringOrBool>,
asserts: bool,
) -> bool {
let if_unchanged = || {
// Git is needed to track modifications here, but tarball source is not available.
// If not modified here or built through tarball source, we maintain consistency
// with '"if available"'.
if !self.rust_info.is_from_tarball()
&& self
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
.is_none()
{
// there are some untracked changes in the the given paths.
false
} else {
llvm::is_ci_llvm_available(&self, asserts)
}
};
match download_ci_llvm {
None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
None => self.channel == "dev" && if_unchanged(),
Some(StringOrBool::Bool(b)) => b,
// FIXME: "if-available" is deprecated. Remove this block later (around mid 2024)
// to not break builds between the recent-to-old checkouts.
Some(StringOrBool::String(s)) if s == "if-available" => {
llvm::is_ci_llvm_available(&self, asserts)
}
Some(StringOrBool::String(s)) if s == "if-unchanged" => {
// Git is needed to track modifications here, but tarball source is not available.
// If not modified here or built through tarball source, we maintain consistency
// with '"if available"'.
if !self.rust_info.is_from_tarball()
&& self
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
.is_none()
{
// there are some untracked changes in the the given paths.
false
} else {
llvm::is_ci_llvm_available(&self, asserts)
}
}
Some(StringOrBool::String(s)) if s == "if-unchanged" => if_unchanged(),
Some(StringOrBool::String(other)) => {
panic!("unrecognized option for download-ci-llvm: {:?}", other)
}
Expand Down
6 changes: 3 additions & 3 deletions src/bootstrap/src/tests/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ fn download_ci_llvm() {
assert_eq!(parse_llvm(""), if_unchanged);
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_unchanged);
assert!(!parse_llvm("rust.channel = \"stable\""));
assert!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""));
assert!(parse_llvm(
assert_eq!(parse_llvm("build.build = \"x86_64-unknown-linux-gnu\""), if_unchanged);
assert_eq!(parse_llvm(
"llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
));
), if_unchanged);
assert!(!parse_llvm(
"llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-unchanged\""
));
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
Submodule llvm-project updated 47 files
+46 −2 .github/workflows/release-binaries.yml
+2 −1 clang-tools-extra/clangd/XRefs.cpp
+14 −1 clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp
+4 −0 clang/docs/ReleaseNotes.rst
+0 −3 clang/include/clang/Driver/Options.td
+4 −7 clang/include/clang/Frontend/DependencyOutputOptions.h
+1 −10 clang/include/clang/Frontend/Utils.h
+15 −1 clang/lib/Basic/Targets/OSTargets.h
+0 −3 clang/lib/Driver/ToolChains/Clang.cpp
+25 −13 clang/lib/Driver/ToolChains/WebAssembly.cpp
+2 −2 clang/lib/Format/TokenAnnotator.cpp
+3 −1 clang/lib/Format/WhitespaceManager.cpp
+1 −1 clang/lib/Format/WhitespaceManager.h
+7 −25 clang/lib/Frontend/DependencyFile.cpp
+4 −4 clang/lib/Lex/ModuleMap.cpp
+7 −12 clang/lib/Sema/SemaOverload.cpp
+1 −1 clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py
+24 −0 clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p2468R2.cppm
+102 −0 clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp
+10 −2 clang/test/CodeGenCXX/float128-declarations.cpp
+0 −6 clang/test/Driver/canonical-system-headers.c
+6 −6 clang/test/Driver/wasm-toolchain.c
+0 −0 clang/test/Preprocessor/Inputs/canonical-system-headers/a.h
+0 −16 clang/test/Preprocessor/canonical-system-headers.c
+32 −0 clang/unittests/Format/FormatTest.cpp
+11 −0 clang/unittests/Format/FormatTestComments.cpp
+3 −3 compiler-rt/test/lit.common.cfg.py
+1 −1 libcxx/include/__config
+3 −2 libcxx/include/__memory/shared_ptr.h
+27 −0 libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
+1 −1 libcxx/utils/libcxx/test/format.py
+2 −2 libcxx/utils/libcxx/test/params.py
+1 −1 llvm/CMakeLists.txt
+23 −0 llvm/include/llvm/CodeGen/TargetInstrInfo.h
+1 −1 llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+2 −2 llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+1 −1 llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+18 −5 llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+2 −0 llvm/lib/Target/AArch64/AArch64InstrInfo.h
+5 −5 llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+33 −0 llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir
+21 −0 llvm/test/CodeGen/RISCV/aext.ll
+1 −1 llvm/test/lit.cfg.py
+5 −3 llvm/tools/llvm-shlib/CMakeLists.txt
+1 −1 llvm/utils/gn/secondary/llvm/version.gni
+2 −2 llvm/utils/lit/lit/TestRunner.py
+1 −1 llvm/utils/lit/lit/__init__.py

0 comments on commit 604f185

Please sign in to comment.