Skip to content

Commit adfbd2f

Browse files
committed
update
1 parent a3bdcfb commit adfbd2f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

crates/symbol-check/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
//! Compile test sources to object files.
22
3+
use std::env;
4+
35
fn 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();

crates/symbol-check/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)