Skip to content

Commit 06162f3

Browse files
committed
Use explicit target compiler flag and set relocation model to static
1 parent 1542660 commit 06162f3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/assembly-llvm/regparm-module-flag.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
//@ add-core-stubs
22
//@ assembly-output: emit-asm
3-
//@ compile-flags: -O -Zregparm=3
4-
//@ only-x86
3+
//@ compile-flags: -O -Zregparm=3 --target=i686-unknown-linux-gnu -C relocation-model=static
4+
//@ needs-llvm-components: x86
55

66
#![feature(no_core)]
77
#![no_std]
88
#![no_core]
99
#![crate_type = "lib"]
1010

11+
extern crate minicore;
1112
use minicore::*;
1213

14+
type c_void = u8;
15+
1316
unsafe extern "C" {
1417
fn memset(p: *mut c_void, val: i32, len: usize) -> *mut c_void;
1518
}

0 commit comments

Comments
 (0)