Swap TargetOptions::linker_is_gnu default from false to true and update targets as appropriate.
This commit is contained in:
parent
99e3aef020
commit
0188664425
7 changed files with 8 additions and 2 deletions
|
@ -22,6 +22,7 @@ pub fn opts(os: &str) -> TargetOptions {
|
||||||
// macOS has -dead_strip, which doesn't rely on function_sections
|
// macOS has -dead_strip, which doesn't rely on function_sections
|
||||||
function_sections: false,
|
function_sections: false,
|
||||||
dynamic_linking: true,
|
dynamic_linking: true,
|
||||||
|
linker_is_gnu: false,
|
||||||
executables: true,
|
executables: true,
|
||||||
families: vec!["unix".to_string()],
|
families: vec!["unix".to_string()],
|
||||||
is_like_osx: true,
|
is_like_osx: true,
|
||||||
|
|
|
@ -33,6 +33,7 @@ pub fn opts() -> TargetOptions {
|
||||||
has_rpath: true,
|
has_rpath: true,
|
||||||
families: vec!["unix".to_string()],
|
families: vec!["unix".to_string()],
|
||||||
is_like_solaris: true,
|
is_like_solaris: true,
|
||||||
|
linker_is_gnu: false,
|
||||||
limit_rdylib_exports: false, // Linker doesn't support this
|
limit_rdylib_exports: false, // Linker doesn't support this
|
||||||
eliminate_frame_pointer: false,
|
eliminate_frame_pointer: false,
|
||||||
eh_frame_header: false,
|
eh_frame_header: false,
|
||||||
|
|
|
@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions {
|
||||||
executables: true,
|
executables: true,
|
||||||
panic_strategy: PanicStrategy::Abort,
|
panic_strategy: PanicStrategy::Abort,
|
||||||
linker: Some("ld".to_string()),
|
linker: Some("ld".to_string()),
|
||||||
|
linker_is_gnu: false,
|
||||||
families: vec!["unix".to_string()],
|
families: vec!["unix".to_string()],
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1086,7 +1086,7 @@ pub struct TargetOptions {
|
||||||
/// Version of DWARF to use if not using the default.
|
/// Version of DWARF to use if not using the default.
|
||||||
/// Useful because some platforms (osx, bsd) only want up to DWARF2.
|
/// Useful because some platforms (osx, bsd) only want up to DWARF2.
|
||||||
pub dwarf_version: Option<u32>,
|
pub dwarf_version: Option<u32>,
|
||||||
/// Whether the linker support GNU-like arguments such as -O. Defaults to false.
|
/// Whether the linker support GNU-like arguments such as -O. Defaults to true.
|
||||||
pub linker_is_gnu: bool,
|
pub linker_is_gnu: bool,
|
||||||
/// The MinGW toolchain has a known issue that prevents it from correctly
|
/// The MinGW toolchain has a known issue that prevents it from correctly
|
||||||
/// handling COFF object files with more than 2<sup>15</sup> sections. Since each weak
|
/// handling COFF object files with more than 2<sup>15</sup> sections. Since each weak
|
||||||
|
@ -1307,7 +1307,7 @@ impl Default for TargetOptions {
|
||||||
is_like_fuchsia: false,
|
is_like_fuchsia: false,
|
||||||
is_like_wasm: false,
|
is_like_wasm: false,
|
||||||
dwarf_version: None,
|
dwarf_version: None,
|
||||||
linker_is_gnu: false,
|
linker_is_gnu: true,
|
||||||
allows_weak_linkage: true,
|
allows_weak_linkage: true,
|
||||||
has_rpath: false,
|
has_rpath: false,
|
||||||
no_default_libraries: true,
|
no_default_libraries: true,
|
||||||
|
|
|
@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions {
|
||||||
is_like_windows: true,
|
is_like_windows: true,
|
||||||
is_like_msvc: true,
|
is_like_msvc: true,
|
||||||
lld_flavor: LldFlavor::Link,
|
lld_flavor: LldFlavor::Link,
|
||||||
|
linker_is_gnu: false,
|
||||||
pre_link_args,
|
pre_link_args,
|
||||||
abi_return_struct_as_int: true,
|
abi_return_struct_as_int: true,
|
||||||
emit_debug_gdb_scripts: false,
|
emit_debug_gdb_scripts: false,
|
||||||
|
|
|
@ -14,6 +14,7 @@ pub fn target() -> Target {
|
||||||
linker_flavor: LinkerFlavor::PtxLinker,
|
linker_flavor: LinkerFlavor::PtxLinker,
|
||||||
// The linker can be installed from `crates.io`.
|
// The linker can be installed from `crates.io`.
|
||||||
linker: Some("rust-ptx-linker".to_string()),
|
linker: Some("rust-ptx-linker".to_string()),
|
||||||
|
linker_is_gnu: false,
|
||||||
|
|
||||||
// With `ptx-linker` approach, it can be later overridden via link flags.
|
// With `ptx-linker` approach, it can be later overridden via link flags.
|
||||||
cpu: "sm_30".to_string(),
|
cpu: "sm_30".to_string(),
|
||||||
|
|
|
@ -8,6 +8,7 @@ pub fn opts() -> TargetOptions {
|
||||||
has_rpath: true,
|
has_rpath: true,
|
||||||
families: vec!["unix".to_string()],
|
families: vec!["unix".to_string()],
|
||||||
is_like_solaris: true,
|
is_like_solaris: true,
|
||||||
|
linker_is_gnu: false,
|
||||||
limit_rdylib_exports: false, // Linker doesn't support this
|
limit_rdylib_exports: false, // Linker doesn't support this
|
||||||
eh_frame_header: false,
|
eh_frame_header: false,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue