File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,11 @@ impl Test {
76
76
let target = if self . msvc {
77
77
"x86_64-pc-windows-msvc"
78
78
} else {
79
- "x86_64-unknown-linux-gnu"
79
+ if cfg ! ( target_os = "macos" ) {
80
+ "x86_64-apple-darwin"
81
+ } else {
82
+ "x86_64-unknown-linux-gnu"
83
+ }
80
84
} ;
81
85
82
86
cfg. target ( target)
Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ fn gnu_opt_level_s() {
55
55
#[ test]
56
56
fn gnu_debug ( ) {
57
57
let test = Test :: gnu ( ) ;
58
- test. gcc ( ) . debug ( true ) . file ( "foo.c" ) . compile ( "foo" ) ;
58
+ test. gcc ( )
59
+ . target ( "x86_64-unknown-linux" )
60
+ . debug ( true )
61
+ . file ( "foo.c" )
62
+ . compile ( "foo" ) ;
59
63
test. cmd ( 0 ) . must_have ( "-gdwarf-4" ) ;
60
64
61
65
let test = Test :: gnu ( ) ;
@@ -70,15 +74,23 @@ fn gnu_debug() {
70
74
#[ test]
71
75
fn gnu_debug_fp_auto ( ) {
72
76
let test = Test :: gnu ( ) ;
73
- test. gcc ( ) . debug ( true ) . file ( "foo.c" ) . compile ( "foo" ) ;
77
+ test. gcc ( )
78
+ . target ( "x86_64-unknown-linux" )
79
+ . debug ( true )
80
+ . file ( "foo.c" )
81
+ . compile ( "foo" ) ;
74
82
test. cmd ( 0 ) . must_have ( "-gdwarf-4" ) ;
75
83
test. cmd ( 0 ) . must_have ( "-fno-omit-frame-pointer" ) ;
76
84
}
77
85
78
86
#[ test]
79
87
fn gnu_debug_fp ( ) {
80
88
let test = Test :: gnu ( ) ;
81
- test. gcc ( ) . debug ( true ) . file ( "foo.c" ) . compile ( "foo" ) ;
89
+ test. gcc ( )
90
+ . target ( "x86_64-unknown-linux" )
91
+ . debug ( true )
92
+ . file ( "foo.c" )
93
+ . compile ( "foo" ) ;
82
94
test. cmd ( 0 ) . must_have ( "-gdwarf-4" ) ;
83
95
test. cmd ( 0 ) . must_have ( "-fno-omit-frame-pointer" ) ;
84
96
}
@@ -89,6 +101,7 @@ fn gnu_debug_nofp() {
89
101
90
102
let test = Test :: gnu ( ) ;
91
103
test. gcc ( )
104
+ . target ( "x86_64-unknown-linux" )
92
105
. debug ( true )
93
106
. force_frame_pointer ( false )
94
107
. file ( "foo.c" )
@@ -98,6 +111,7 @@ fn gnu_debug_nofp() {
98
111
99
112
let test = Test :: gnu ( ) ;
100
113
test. gcc ( )
114
+ . target ( "x86_64-unknown-linux" )
101
115
. force_frame_pointer ( false )
102
116
. debug ( true )
103
117
. file ( "foo.c" )
You can’t perform that action at this time.
0 commit comments