Skip to content

Commit

Permalink
Auto merge of rust-lang#120055 - nikic:llvm-18, r=<try>
Browse files Browse the repository at this point in the history
Update to LLVM 18

Blocked on rust-lang#120529.

LLVM 18 final is planned to be released on Mar 5th. Rust 1.78 is planned to be released on May 2nd.

Tested images: dist-x86_64-linux, dist-s390x-linux, dist-aarch64-linux, dist-riscv64-linux, dist-loongarch64-linux, dist-x86_64-freebsd, dist-x86_64-illumos, dist-x86_64-musl, x86_64-linux-integration, test-various, armhf-gnu

r? `@ghost`
  • Loading branch information
bors committed Jan 31, 2024
2 parents cdaa12e + 7fc034e commit 78fca70
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 20 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -571,10 +571,30 @@ jobs:
strategy:
matrix:
include:
- name: dist-x86_64-linux
- name: x86_64-msvc
env:
CODEGEN_BACKENDS: "llvm,cranelift"
os: ubuntu-20.04-16core-64gb
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-profiler"
SCRIPT: make ci-msvc
os: windows-2019-8core-32gb
- name: i686-msvc
env:
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-msvc"
SCRIPT: make ci-msvc
os: windows-2019-8core-32gb
- name: i686-mingw
env:
RUST_CONFIGURE_ARGS: "--build=i686-pc-windows-gnu"
SCRIPT: make ci-mingw
NO_DOWNLOAD_CI_LLVM: 1
CUSTOM_MINGW: 1
os: windows-2019-8core-32gb
- name: x86_64-mingw
env:
SCRIPT: make ci-mingw
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-gnu --enable-profiler"
NO_DOWNLOAD_CI_LLVM: 1
CUSTOM_MINGW: 1
os: windows-2019-8core-32gb
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
steps:
Expand Down
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
shallow = true
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/17.0-2023-12-14
url = https://github.com/nikic/llvm-project.git
branch = rust-llvm-18
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,9 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"

[[package]]
name = "compiler_builtins"
version = "0.1.105"
version = "0.1.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3686cc48897ce1950aa70fd595bd2dc9f767a3c4cca4cd17b2cb52a2d37e6eb4"
checksum = "8da8e35920ddd38b7bbd68866060057a69c3368301d56f8b852bd581516d4dcd"
dependencies = [
"cc",
"rustc-std-workspace-core",
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM,
}

extern "C" size_t LLVMRustGetTargetFeaturesCount(LLVMTargetMachineRef TM) {
#ifdef LLVM_RUSTLLVM
#if LLVM_VERSION_GE(18, 0)
const TargetMachine *Target = unwrap(TM);
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getAllProcessorFeatures();
return FeatTable.size();
#else
return 0;
Expand All @@ -380,10 +380,10 @@ extern "C" size_t LLVMRustGetTargetFeaturesCount(LLVMTargetMachineRef TM) {

extern "C" void LLVMRustGetTargetFeature(LLVMTargetMachineRef TM, size_t Index,
const char** Feature, const char** Desc) {
#ifdef LLVM_RUSTLLVM
#if LLVM_VERSION_GE(18, 0)
const TargetMachine *Target = unwrap(TM);
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getAllProcessorFeatures();
const SubtargetFeatureKV Feat = FeatTable[Index];
*Feature = Feat.Key;
*Desc = Feat.Desc;
Expand Down
35 changes: 31 additions & 4 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,39 @@ jobs:
strategy:
matrix:
include:
- &dist-x86_64-linux
name: dist-x86_64-linux
- name: x86_64-msvc
env:
CODEGEN_BACKENDS: llvm,cranelift
<<: *job-linux-16c
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-profiler
SCRIPT: make ci-msvc
<<: *job-windows-8c

- name: i686-msvc
env:
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
SCRIPT: make ci-msvc
<<: *job-windows-8c

- name: i686-mingw
env:
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
SCRIPT: make ci-mingw
# We are intentionally allowing an old toolchain on this builder (and that's
# incompatible with LLVM downloads today).
NO_DOWNLOAD_CI_LLVM: 1
CUSTOM_MINGW: 1
<<: *job-windows-8c

- name: x86_64-mingw
env:
SCRIPT: make ci-mingw
RUST_CONFIGURE_ARGS: >-
--build=x86_64-pc-windows-gnu
--enable-profiler
# We are intentionally allowing an old toolchain on this builder (and that's
# incompatible with LLVM downloads today).
NO_DOWNLOAD_CI_LLVM: 1
CUSTOM_MINGW: 1
<<: *job-windows-8c

master:
name: master
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
2 changes: 1 addition & 1 deletion tests/run-make/rust-lld-custom-target/custom-target.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"arch": "x86_64",
"cpu": "x86-64",
"crt-static-respected": true,
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"dynamic-linking": true,
"env": "gnu",
"has-rpath": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-target-spec-json-path/target.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"arch": "x86_64",
"cpu": "x86-64",
"crt-static-respected": true,
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"dynamic-linking": true,
"env": "gnu",
"executables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/target-specs/my-awesome-platform.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
"linker-flavor": "gcc",
"llvm-target": "i686-unknown-linux-gnu",
"target-endian": "little",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pre-link-args": {"gcc": ["-m64"]},
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"linker-flavor": "gcc",
"llvm-target": "x86_64-unknown-linux-gnu",
"target-endian": "little",
Expand Down

0 comments on commit 78fca70

Please sign in to comment.