rust/tests/ui/amdgpu-require-explicit-cpu.rs
Flakebi 56795fb77a
Add amdgpu target
Add target and compile the amdgpu llvm backend.
2025-01-31 09:59:41 +01:00

18 lines
417 B
Rust

//@ revisions: nocpu cpu
//@ no-prefer-dynamic
//@ compile-flags: --crate-type=cdylib --target=amdgcn-amd-amdhsa
//@ needs-llvm-components: amdgpu
//@ needs-rust-lld
//@[nocpu] error-pattern: target requires explicitly specifying a cpu
//@[nocpu] build-fail
//@[cpu] compile-flags: -Ctarget-cpu=gfx900
//@[cpu] build-pass
#![feature(no_core, lang_items)]
#![no_core]
#[lang="sized"]
trait Sized {}
pub fn foo() {}