File tree 7 files changed +8
-2
lines changed
compiler/rustc_target/src/spec
7 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ pub fn opts(os: &str) -> TargetOptions {
22
22
// macOS has -dead_strip, which doesn't rely on function_sections
23
23
function_sections : false ,
24
24
dynamic_linking : true ,
25
+ linker_is_gnu : false ,
25
26
executables : true ,
26
27
families : vec ! [ "unix" . to_string( ) ] ,
27
28
is_like_osx : true ,
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ pub fn opts() -> TargetOptions {
33
33
has_rpath : true ,
34
34
families : vec ! [ "unix" . to_string( ) ] ,
35
35
is_like_solaris : true ,
36
+ linker_is_gnu : false ,
36
37
limit_rdylib_exports : false , // Linker doesn't support this
37
38
eliminate_frame_pointer : false ,
38
39
eh_frame_header : false ,
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions {
20
20
executables : true ,
21
21
panic_strategy : PanicStrategy :: Abort ,
22
22
linker : Some ( "ld" . to_string ( ) ) ,
23
+ linker_is_gnu : false ,
23
24
families : vec ! [ "unix" . to_string( ) ] ,
24
25
..Default :: default ( )
25
26
}
Original file line number Diff line number Diff line change @@ -1086,7 +1086,7 @@ pub struct TargetOptions {
1086
1086
/// Version of DWARF to use if not using the default.
1087
1087
/// Useful because some platforms (osx, bsd) only want up to DWARF2.
1088
1088
pub dwarf_version : Option < u32 > ,
1089
- /// Whether the linker support GNU-like arguments such as -O. Defaults to false .
1089
+ /// Whether the linker support GNU-like arguments such as -O. Defaults to true .
1090
1090
pub linker_is_gnu : bool ,
1091
1091
/// The MinGW toolchain has a known issue that prevents it from correctly
1092
1092
/// handling COFF object files with more than 2<sup>15</sup> sections. Since each weak
@@ -1307,7 +1307,7 @@ impl Default for TargetOptions {
1307
1307
is_like_fuchsia : false ,
1308
1308
is_like_wasm : false ,
1309
1309
dwarf_version : None ,
1310
- linker_is_gnu : false ,
1310
+ linker_is_gnu : true ,
1311
1311
allows_weak_linkage : true ,
1312
1312
has_rpath : false ,
1313
1313
no_default_libraries : true ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions {
16
16
is_like_windows : true ,
17
17
is_like_msvc : true ,
18
18
lld_flavor : LldFlavor :: Link ,
19
+ linker_is_gnu : false ,
19
20
pre_link_args,
20
21
abi_return_struct_as_int : true ,
21
22
emit_debug_gdb_scripts : false ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ pub fn target() -> Target {
14
14
linker_flavor : LinkerFlavor :: PtxLinker ,
15
15
// The linker can be installed from `crates.io`.
16
16
linker : Some ( "rust-ptx-linker" . to_string ( ) ) ,
17
+ linker_is_gnu : false ,
17
18
18
19
// With `ptx-linker` approach, it can be later overridden via link flags.
19
20
cpu : "sm_30" . to_string ( ) ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ pub fn opts() -> TargetOptions {
8
8
has_rpath : true ,
9
9
families : vec ! [ "unix" . to_string( ) ] ,
10
10
is_like_solaris : true ,
11
+ linker_is_gnu : false ,
11
12
limit_rdylib_exports : false , // Linker doesn't support this
12
13
eh_frame_header : false ,
13
14
You can’t perform that action at this time.
0 commit comments