From 321d17a94b90863bb02900739136dc3229a32ac5 Mon Sep 17 00:00:00 2001 From: bors Date: Thu, 14 Nov 2024 07:07:53 +0000 Subject: [PATCH] Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee Rollup of 7 pull requests Successful merges: - #131304 (float types: move copysign, abs, signum to libcore) - #132907 (Change intrinsic declarations to new style) - #132971 (Handle infer vars in anon consts on stable) - #133003 (Make `CloneToUninit` dyn-compatible) - #133004 (btree: simplify the backdoor between set and map) - #133008 (update outdated comment about test-float-parse) - #133012 (Add test cases for #125918) r? `@ghost` `@rustbot` modify labels: rollup --- compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 12 +++++++----- library/std/src/os/nuttx/raw.rs | 4 ++++ src/ci/run.sh | 4 ++++ src/tools/compiletest/src/directive-list.rs | 3 +++ src/tools/compiletest/src/header.rs | 3 +++ src/tools/compiletest/src/header/tests.rs | 3 +++ src/tools/tidy/src/known_bug.rs | 5 +++++ tests/assembly/riscv-soft-abi-with-float-features.rs | 4 ++++ tests/assembly/x86_64-cmp.rs | 4 ++++ tests/codegen/branch-protection-old-llvm.rs | 4 ++++ tests/codegen/call-metadata.rs | 4 ++++ tests/codegen/integer-cmp.rs | 4 ++++ 12 files changed, 49 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 489c911d7eedd..13dadb0250a8b 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -882,12 +882,10 @@ extern "C" LLVMRustResult LLVMRustOptimize( SanitizerOptions->SanitizeKernelAddress) { OptimizerLastEPCallbacks.push_back( #if LLVM_VERSION_GE(20, 0) - [SanitizerOptions, TM](ModulePassManager &MPM, - OptimizationLevel Level, - ThinOrFullLTOPhase phase) { + [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level, + ThinOrFullLTOPhase phase) { #else - [SanitizerOptions, TM](ModulePassManager &MPM, - OptimizationLevel Level) { + [SanitizerOptions](ModulePassManager &MPM, OptimizationLevel Level) { #endif auto CompileKernel = SanitizerOptions->SanitizeKernelAddress; AddressSanitizerOptions opts = AddressSanitizerOptions{ @@ -897,12 +895,16 @@ extern "C" LLVMRustResult LLVMRustOptimize( /*UseAfterScope=*/true, AsanDetectStackUseAfterReturnMode::Runtime, }; +<<<<<<< HEAD MPM.addPass(AddressSanitizerPass( opts, /*UseGlobalGC*/ true, // UseOdrIndicator should be false on windows machines // https://reviews.llvm.org/D137227 !TM->getTargetTriple().isOSWindows())); +======= + MPM.addPass(AddressSanitizerPass(opts)); +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) }); } if (SanitizerOptions->SanitizeHWAddress) { diff --git a/library/std/src/os/nuttx/raw.rs b/library/std/src/os/nuttx/raw.rs index 431e66d69a372..3429180eeaff3 100644 --- a/library/std/src/os/nuttx/raw.rs +++ b/library/std/src/os/nuttx/raw.rs @@ -1,4 +1,8 @@ +<<<<<<< HEAD //! NuttX raw type definitions +======= +//! rtems raw type definitions +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) #![stable(feature = "raw_ext", since = "1.1.0")] #![deprecated( diff --git a/src/ci/run.sh b/src/ci/run.sh index 5690d8edea6a2..c63a31729df57 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -115,12 +115,16 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNE if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.remap-debuginfo" +<<<<<<< HEAD if [ "$DEPLOY_ALT" != "" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level=2" else RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1" fi +======= + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --debuginfo-level-std=1" +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs index bdd0b80b3957c..468e420bcf2ab 100644 --- a/src/tools/compiletest/src/directive-list.rs +++ b/src/tools/compiletest/src/directive-list.rs @@ -120,7 +120,10 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "incremental", "known-bug", "llvm-cov-flags", +<<<<<<< HEAD "max-llvm-major-version", +======= +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) "min-cdb-version", "min-gdb-version", "min-lldb-version", diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 3539e85ba632b..f38aa46c1d28a 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -1547,6 +1547,7 @@ fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision { }; } } else if let Some(version_string) = +<<<<<<< HEAD config.parse_name_value_directive(line, "max-llvm-major-version") { let max_version = extract_llvm_version(&version_string); @@ -1561,6 +1562,8 @@ fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision { }; } } else if let Some(version_string) = +======= +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) config.parse_name_value_directive(line, "min-system-llvm-version") { let min_version = extract_llvm_version(&version_string); diff --git a/src/tools/compiletest/src/header/tests.rs b/src/tools/compiletest/src/header/tests.rs index 4d75c38dd3206..c9125050b096a 100644 --- a/src/tools/compiletest/src/header/tests.rs +++ b/src/tools/compiletest/src/header/tests.rs @@ -299,6 +299,7 @@ fn llvm_version() { let config: Config = cfg().llvm_version("10.6.2").build(); assert!(!check_ignore(&config, "//@ exact-llvm-major-version: 10")); +<<<<<<< HEAD let config: Config = cfg().llvm_version("19.0.0").build(); assert!(!check_ignore(&config, "//@ max-llvm-major-version: 19")); @@ -308,6 +309,8 @@ fn llvm_version() { let config: Config = cfg().llvm_version("20.0.0").build(); assert!(check_ignore(&config, "//@ max-llvm-major-version: 19")); +======= +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) } #[test] diff --git a/src/tools/tidy/src/known_bug.rs b/src/tools/tidy/src/known_bug.rs index a877165414400..f069d9866587a 100644 --- a/src/tools/tidy/src/known_bug.rs +++ b/src/tools/tidy/src/known_bug.rs @@ -6,6 +6,7 @@ use crate::walk::*; pub fn check(filepath: &Path, bad: &mut bool) { walk(filepath, |path, _is_dir| filter_not_rust(path), &mut |entry, contents| { +<<<<<<< HEAD let file: &Path = entry.path(); // files in "auxiliary" do not need to crash by themselves @@ -22,6 +23,10 @@ pub fn check(filepath: &Path, bad: &mut bool) { _aux_file_rs ]) && !contents.lines().any(|line| line.starts_with("//@ known-bug: ")) { +======= + let file = entry.path(); + if !contents.lines().any(|line| line.starts_with("//@ known-bug: ")) { +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) tidy_error!( bad, "{} crash/ice test does not have a \"//@ known-bug: \" directive", diff --git a/tests/assembly/riscv-soft-abi-with-float-features.rs b/tests/assembly/riscv-soft-abi-with-float-features.rs index 8ccfa72a7b6f1..563bd5b465a2c 100644 --- a/tests/assembly/riscv-soft-abi-with-float-features.rs +++ b/tests/assembly/riscv-soft-abi-with-float-features.rs @@ -2,7 +2,11 @@ //@ compile-flags: --target riscv64imac-unknown-none-elf -Ctarget-feature=+f,+d //@ needs-llvm-components: riscv //@ revisions: LLVM-PRE-20 LLVM-POST-20 +<<<<<<< HEAD //@ [LLVM-PRE-20] max-llvm-major-version: 19 +======= +//@ [LLVM-PRE-20] ignore-llvm-version: 20 - 99 +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) //@ [LLVM-POST-20] min-llvm-version: 20 #![feature(no_core, lang_items, f16)] diff --git a/tests/assembly/x86_64-cmp.rs b/tests/assembly/x86_64-cmp.rs index 8cccab7d40dab..f0cb37610216e 100644 --- a/tests/assembly/x86_64-cmp.rs +++ b/tests/assembly/x86_64-cmp.rs @@ -1,7 +1,11 @@ //@ revisions: DEBUG LLVM-PRE-20-OPTIM LLVM-20-OPTIM //@ [DEBUG] compile-flags: -C opt-level=0 //@ [LLVM-PRE-20-OPTIM] compile-flags: -C opt-level=3 +<<<<<<< HEAD //@ [LLVM-PRE-20-OPTIM] max-llvm-major-version: 19 +======= +//@ [LLVM-PRE-20-OPTIM] ignore-llvm-version: 20 - 99 +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) //@ [LLVM-20-OPTIM] compile-flags: -C opt-level=3 //@ [LLVM-20-OPTIM] min-llvm-version: 20 //@ assembly-output: emit-asm diff --git a/tests/codegen/branch-protection-old-llvm.rs b/tests/codegen/branch-protection-old-llvm.rs index 1846f35479db4..df229bcb55729 100644 --- a/tests/codegen/branch-protection-old-llvm.rs +++ b/tests/codegen/branch-protection-old-llvm.rs @@ -7,7 +7,11 @@ //@ [LEAF] compile-flags: -Z branch-protection=pac-ret,leaf //@ [BKEY] compile-flags: -Z branch-protection=pac-ret,b-key //@ compile-flags: --target aarch64-unknown-linux-gnu +<<<<<<< HEAD //@ max-llvm-major-version: 18 +======= +//@ ignore-llvm-version: 19 - 99 +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) #![crate_type = "lib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/call-metadata.rs b/tests/codegen/call-metadata.rs index b986b4467face..818afe4625545 100644 --- a/tests/codegen/call-metadata.rs +++ b/tests/codegen/call-metadata.rs @@ -2,7 +2,11 @@ // scalar value. //@ compile-flags: -O -C no-prepopulate-passes +<<<<<<< HEAD //@ max-llvm-major-version: 18 +======= +//@ ignore-llvm-version: 19 - 99 +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) #![crate_type = "lib"] diff --git a/tests/codegen/integer-cmp.rs b/tests/codegen/integer-cmp.rs index 9bbf243946d1a..5f183596517de 100644 --- a/tests/codegen/integer-cmp.rs +++ b/tests/codegen/integer-cmp.rs @@ -3,7 +3,11 @@ //@ revisions: llvm-pre-20 llvm-20 //@ [llvm-20] min-llvm-version: 20 +<<<<<<< HEAD //@ [llvm-pre-20] max-llvm-major-version: 19 +======= +//@ [llvm-pre-20] ignore-llvm-version: 20 - 99 +>>>>>>> dae7ac13 (Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubilee) //@ compile-flags: -C opt-level=3 #![crate_type = "lib"]