Skip to content

Commit

Permalink
Auto merge of #107224 - nikic:llvm-16, r=cuviper
Browse files Browse the repository at this point in the history
Upgrade to LLVM 16

This updates Rust to LLVM 16. It also updates our host compiler for dist-x86_64-linux to LLVM 16. The reason for that is that Bolt from LLVM 15 is not capable of compiling LLVM 16 (llvm/llvm-project#61114).

LLVM 16.0.0 has been [released](https://discourse.llvm.org/t/llvm-16-0-0-release/69326) on March 18, while Rust 1.70 will become stable on June 1.

Tested images: `dist-x86_64-linux`, `dist-riscv64-linux` (alt), `dist-x86_64-illumos`, `dist-various-1`, `dist-various-2`, `dist-powerpc-linux`, `wasm32`, `armhf-gnu`
Tested images until the usual IPv6 failures: `test-various`
  • Loading branch information
bors committed Mar 18, 2023
2 parents 2d0a7de + b238a76 commit 4a04d08
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/15.0-2022-12-07
branch = rustc/16.0-2023-03-06
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
url = https://github.com/rust-embedded/book.git
Expand Down
9 changes: 5 additions & 4 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,11 @@ impl Config {
config.rust_profile_generate = flags.rust_profile_generate;
}

// rust_info must be set before is_ci_llvm_available() is called.
let default = config.channel == "dev";
config.ignore_git = ignore_git.unwrap_or(default);
config.rust_info = GitInfo::new(config.ignore_git, &config.src);

if let Some(llvm) = toml.llvm {
match llvm.ccache {
Some(StringOrBool::String(ref s)) => config.ccache = Some(s.to_string()),
Expand Down Expand Up @@ -1346,10 +1351,6 @@ impl Config {
config.rust_debuginfo_level_tools = with_defaults(debuginfo_level_tools);
config.rust_debuginfo_level_tests = debuginfo_level_tests.unwrap_or(0);

let default = config.channel == "dev";
config.ignore_git = ignore_git.unwrap_or(default);
config.rust_info = GitInfo::new(config.ignore_git, &config.src);

let download_rustc = config.download_rustc_commit.is_some();
// See https://github.com/rust-lang/compiler-team/issues/326
config.stage = match config.cmd {
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
6 changes: 3 additions & 3 deletions tests/codegen/array-map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ pub fn short_integer_zip_map(x: [u32; 8], y: [u32; 8]) -> [u32; 8] {
//
// CHECK-LABEL: @long_integer_map
#[no_mangle]
pub fn long_integer_map(x: [u32; 64]) -> [u32; 64] {
pub fn long_integer_map(x: [u32; 512]) -> [u32; 512] {
// CHECK: start:
// CHECK-NEXT: alloca [64 x i32]
// CHECK-NEXT: alloca %"core::mem::manually_drop::ManuallyDrop<[u32; 64]>"
// CHECK-NEXT: alloca [512 x i32]
// CHECK-NEXT: alloca %"core::mem::manually_drop::ManuallyDrop<[u32; 512]>"
// CHECK-NOT: alloca
// CHECK: mul <{{[0-9]+}} x i32>
// CHECK: add <{{[0-9]+}} x i32>
Expand Down

0 comments on commit 4a04d08

Please sign in to comment.