Only add cfguard module flag on windows-msvc
This commit is contained in:
parent
e1beee4992
commit
1ca7bfe481
7 changed files with 36 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
// compile-flags: -Z control-flow-guard=checks
|
||||
// only-msvc
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
// compile-flags: -Z control-flow-guard=no
|
||||
// only-msvc
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
// compile-flags: -Z control-flow-guard=nochecks
|
||||
// only-msvc
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
11
src/test/codegen/cfguard-non-msvc.rs
Normal file
11
src/test/codegen/cfguard-non-msvc.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// compile-flags: -Z control-flow-guard
|
||||
// ignore-msvc
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// A basic test function.
|
||||
pub fn test() {
|
||||
}
|
||||
|
||||
// Ensure the cfguard module flag is not added for non-MSVC targets.
|
||||
// CHECK-NOT: !"cfguard"
|
||||
6
src/test/ui/cfguard-run.rs
Normal file
6
src/test/ui/cfguard-run.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// run-pass
|
||||
// compile-flags: -Z control-flow-guard
|
||||
|
||||
pub fn main() {
|
||||
println!("hello, world");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue