forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#137801 - petrochenkov:tarmod, r=compiler-er…
…rors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
- Loading branch information
Showing
9 changed files
with
43 additions
and
104 deletions.
There are no files selected for viewing
21 changes: 4 additions & 17 deletions
21
tests/ui/target_modifiers/auxiliary/default_reg_struct_return.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Cpanic=abort | ||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ no-prefer-dynamic | ||
//@ compile-flags: --target i686-unknown-linux-gnu | ||
//@ needs-llvm-components: x86 | ||
|
||
#![feature(no_core)] | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
#[lang = "copy"] | ||
trait Copy {} | ||
|
||
pub fn somefun() {} | ||
|
||
pub struct S; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=2 -Cpanic=abort | ||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ no-prefer-dynamic | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=2 | ||
//@ needs-llvm-components: x86 | ||
|
||
#![feature(no_core)] | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
#[lang = "copy"] | ||
trait Copy {} | ||
|
||
pub fn somefun() {} | ||
|
||
pub struct S; |
21 changes: 4 additions & 17 deletions
21
tests/ui/target_modifiers/auxiliary/wrong_regparm_and_ret.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=2 -Zreg-struct-return=true -Cpanic=abort | ||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ no-prefer-dynamic | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=2 -Zreg-struct-return=true | ||
//@ needs-llvm-components: x86 | ||
|
||
#![feature(no_core)] | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
#[lang = "copy"] | ||
trait Copy {} | ||
|
||
pub fn somefun() {} | ||
|
||
pub struct S; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
// Tests that default unspecified target modifier value in dependency crate is ok linked | ||
// with the same value, explicitly specified | ||
//@ aux-crate:default_reg_struct_return=default_reg_struct_return.rs | ||
|
||
//@ aux-build:default_reg_struct_return.rs | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Cpanic=abort | ||
//@ revisions:error ok ok_explicit | ||
//@ needs-llvm-components: x86 | ||
|
||
//@ revisions: ok ok_explicit error | ||
//@[ok] compile-flags: | ||
//@[ok_explicit] compile-flags: -Zreg-struct-return=false | ||
//@[error] compile-flags: -Zreg-struct-return=true | ||
//@[ok] check-pass | ||
//@[ok_explicit] check-pass | ||
|
||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ needs-llvm-components: x86 | ||
//@[ok] build-pass | ||
//@[ok_explicit] build-pass | ||
|
||
#![crate_type = "rlib"] | ||
#![feature(no_core)] | ||
//[error]~^ ERROR mixing `-Zreg-struct-return` will cause an ABI mismatch in crate `defaults_check` | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
fn foo() { | ||
default_reg_struct_return::somefun(); | ||
} | ||
extern crate default_reg_struct_return; |
4 changes: 2 additions & 2 deletions
4
tests/ui/target_modifiers/incompatible_regparm.error_generated.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
//@ aux-crate:wrong_regparm=wrong_regparm.rs | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=1 -Cpanic=abort | ||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ aux-build:wrong_regparm.rs | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Zregparm=1 | ||
//@ needs-llvm-components: x86 | ||
//@ revisions:error_generated allow_regparm_mismatch allow_no_value | ||
|
||
//@ revisions:allow_regparm_mismatch allow_no_value error_generated | ||
//@[allow_regparm_mismatch] compile-flags: -Cunsafe-allow-abi-mismatch=regparm | ||
//@[allow_regparm_mismatch] build-pass | ||
//@[allow_no_value] compile-flags: -Cunsafe-allow-abi-mismatch | ||
//@[error_generated] compile-flags: | ||
//@[allow_regparm_mismatch] check-pass | ||
|
||
#![crate_type = "rlib"] | ||
#![feature(no_core)] | ||
//[error_generated]~^ ERROR mixing `-Zregparm` will cause an ABI mismatch in crate `incompatible_regparm` | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
fn foo() { | ||
wrong_regparm::somefun(); | ||
} | ||
extern crate wrong_regparm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
//@ aux-crate:wrong_regparm_and_ret=wrong_regparm_and_ret.rs | ||
//@ compile-flags: --target i686-unknown-linux-gnu -Cpanic=abort | ||
// Auxiliary build problems with aarch64-apple: | ||
// Shared library linking cc seems to convert "-m32" flag into -arch armv4t | ||
// Auxiliary build problems with i686-mingw: linker `cc` not found | ||
//@ only-x86 | ||
//@ ignore-windows | ||
//@ ignore-apple | ||
//@ aux-build:wrong_regparm_and_ret.rs | ||
//@ compile-flags: --target i686-unknown-linux-gnu | ||
//@ needs-llvm-components: x86 | ||
//@ revisions:two_allowed unknown_allowed | ||
|
||
//@ revisions:two_allowed unknown_allowed | ||
//@[two_allowed] compile-flags: -Cunsafe-allow-abi-mismatch=regparm,reg-struct-return | ||
//@[two_allowed] build-pass | ||
//@[unknown_allowed] compile-flags: -Cunsafe-allow-abi-mismatch=unknown_flag -Zregparm=2 -Zreg-struct-return=true | ||
//@[two_allowed] check-pass | ||
|
||
#![crate_type = "rlib"] | ||
#![feature(no_core)] | ||
//[unknown_allowed]~^ ERROR unknown target modifier `unknown_flag`, requested by `-Cunsafe-allow-abi-mismatch=unknown_flag` | ||
#![crate_type = "rlib"] | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
|
||
fn foo() { | ||
wrong_regparm_and_ret::somefun(); | ||
} | ||
extern crate wrong_regparm_and_ret; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters