File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11//! Compile test sources to object files.
22
3+ use std:: env;
4+
35fn main ( ) {
46 let compiler = cc:: Build :: new ( ) . get_compiler ( ) ;
57
8+ println ! (
9+ "cargo::rustc-env=OBJ_TARGET={}" ,
10+ env:: var( "TARGET" ) . unwrap( )
11+ ) ;
12+
613 let objs = cc:: Build :: new ( )
714 . file ( "tests/no_gnu_stack.S" )
815 . compile_intermediates ( ) ;
Original file line number Diff line number Diff line change @@ -414,7 +414,8 @@ fn check_no_gnu_stack_obj() {
414414 ) ;
415415 let has_exe_stack = obj_requires_exe_stack ( & obj) ;
416416
417- if cfg ! ( target_os = "windows" ) || cfg ! ( target_vendor = "apple" ) {
417+ let obj_target = env ! ( "OBJ_TARGET" ) ;
418+ if obj_target. contains ( "-windows-" ) || obj_target. contains ( "-apple-" ) {
418419 // Non-ELF targets don't have executable stacks marked in the same way
419420 assert ! ( !has_exe_stack) ;
420421 } else {
You can’t perform that action at this time.
0 commit comments