Skip to content

Commit 9bb7e05

Browse files
committed
Auto merge of rust-lang#127513 - nikic:llvm-19, r=cuviper
Update to LLVM 19 The LLVM 19.1.0 final release is planned for Sep 3rd. The rustc 1.82 stable release will be on Oct 17th. The unstable MC/DC coverage support is temporarily broken by this update. It will be restored by rust-lang#126733. The implementation changed substantially in LLVM 19, and there are no plans to support both the LLVM 18 and LLVM 19 implementation at the same time. Compatibility note for wasm: > WebAssembly target support for the `multivalue` target feature has changed when upgrading to LLVM 19. Support for generating functions with multiple returns no longer works and `-Ctarget-feature=+multivalue` has a different meaning than it did in LLVM 18 and prior. The WebAssembly target features `multivalue` and `reference-types` are now both enabled by default, but generated code is not affected by default. These features being enabled are encoded in the `target_features` custom section and may affect downstream tooling such as `wasm-opt` consuming the module, but the actual generated WebAssembly will continue to not use either `multivalue` or `reference-types` by default. There is no longer any supported means to generate a module that has a function with multiple returns. Related changes: * rust-lang#127605 * rust-lang#127613 * rust-lang#127654 * rust-lang#128141 * llvm/llvm-project#98933 Fixes rust-lang#121444. Fixes rust-lang#128212.
2 parents 249cf71 + b960390 commit 9bb7e05

File tree

9 files changed

+12
-5
lines changed

9 files changed

+12
-5
lines changed

.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/18.1-2024-05-19
36+
branch = rustc/19.1-2024-07-30
3737
shallow = true
3838
[submodule "src/doc/embedded-book"]
3939
path = src/doc/embedded-book

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) {
15551555

15561556
extern "C" LLVMValueRef
15571557
LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
1558-
#if LLVM_VERSION_GE(18, 0)
1558+
#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0)
15591559
return wrap(llvm::Intrinsic::getDeclaration(
15601560
unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update));
15611561
#else

src/llvm-project

tests/coverage/mcdc/condition-limit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
33
//@ min-llvm-version: 18
4+
//@ ignore-llvm-version: 19 - 99
45
//@ compile-flags: -Zcoverage-options=mcdc
56
//@ llvm-cov-flags: --show-branches=count --show-mcdc
67

tests/coverage/mcdc/if.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
33
//@ min-llvm-version: 18
4+
//@ ignore-llvm-version: 19 - 99
45
//@ compile-flags: -Zcoverage-options=mcdc
56
//@ llvm-cov-flags: --show-branches=count --show-mcdc
67

tests/coverage/mcdc/inlined_expressions.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
33
//@ min-llvm-version: 18
4+
//@ ignore-llvm-version: 19 - 99
45
//@ compile-flags: -Zcoverage-options=mcdc -Copt-level=z -Cllvm-args=--inline-threshold=0
56
//@ llvm-cov-flags: --show-branches=count --show-mcdc
67

tests/coverage/mcdc/nested_if.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
33
//@ min-llvm-version: 18
4+
//@ ignore-llvm-version: 19 - 99
45
//@ compile-flags: -Zcoverage-options=mcdc
56
//@ llvm-cov-flags: --show-branches=count --show-mcdc
67

tests/coverage/mcdc/non_control_flow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![feature(coverage_attribute)]
22
//@ edition: 2021
33
//@ min-llvm-version: 18
4+
//@ ignore-llvm-version: 19 - 99
45
//@ compile-flags: -Zcoverage-options=mcdc
56
//@ llvm-cov-flags: --show-branches=count --show-mcdc
67

tests/crashes/121444.rs renamed to tests/ui/abi/large-byval-align.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
//@ known-bug: #121444
21
//@ compile-flags: -Copt-level=0
3-
//@ edition:2021
42
//@ only-x86_64
53
//@ ignore-windows
4+
//@ min-llvm-version: 19
5+
//@ build-pass
6+
67
#[repr(align(536870912))]
78
pub struct A(i64);
89

10+
#[allow(improper_ctypes_definitions)]
911
pub extern "C" fn foo(x: A) {}
1012

1113
fn main() {

0 commit comments

Comments
 (0)