From 0fd668996a5e1a90fd55bac1062e54cf4b550e58 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 29 May 2024 07:40:21 +0200 Subject: [PATCH] enable ABI compat tests for nvptx and csky --- compiler/rustc_ty_utils/src/abi.rs | 3 ++- tests/ui/abi/compatibility.rs | 17 ++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index 6f513f24948a5..acebabe67d616 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -520,7 +520,8 @@ fn fn_abi_sanity_check<'tcx>( assert!( matches!(&*cx.tcx.sess.target.arch, "wasm32" | "wasm64") || matches!(spec_abi, SpecAbi::PtxKernel | SpecAbi::Unadjusted), - r#"`PassMode::Direct` for aggregates only allowed for "unadjusted" and "ptx-kernel" functions and on wasm\nProblematic type: {:#?}"#, + "`PassMode::Direct` for aggregates only allowed for \"unadjusted\" and \"ptx-kernel\" functions and on wasm\n + Problematic type: {:#?}", arg.layout, ); } diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs index 373d1cce1d73d..b8517826232a9 100644 --- a/tests/ui/abi/compatibility.rs +++ b/tests/ui/abi/compatibility.rs @@ -52,17 +52,12 @@ //@ revisions: m68k //@[m68k] compile-flags: --target m68k-unknown-linux-gnu //@[m68k] needs-llvm-components: m68k -// FIXME: disabled on nvptx64 since the target ABI fails the sanity check -// see https://github.com/rust-lang/rust/issues/117480 -/* revisions: nvptx64 - [nvptx64] compile-flags: --target nvptx64-nvidia-cuda - [nvptx64] needs-llvm-components: nvptx -*/ -// FIXME: disabled since it fails on CI saying the csky component is missing -/* revisions: csky - [csky] compile-flags: --target csky-unknown-linux-gnuabiv2 - [csky] needs-llvm-components: csky -*/ +//@revisions: nvptx64 +//@[nvptx64] compile-flags: --target nvptx64-nvidia-cuda +//@[nvptx64] needs-llvm-components: nvptx +//@revisions: csky +//@[csky] compile-flags: --target csky-unknown-linux-gnuabiv2 +//@[csky] needs-llvm-components: csky #![feature(rustc_attrs, unsized_fn_params, transparent_unions)] #![cfg_attr(not(host), feature(no_core, lang_items), no_std, no_core)] #![allow(unused, improper_ctypes_definitions, internal_features)]