-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #71180 - Dylan-DPC:rollup-pscpg6q, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #69903 (Do not ICE in the face of invalid enum discriminant) - #70354 (Update RELEASES.md for 1.43.0) - #70774 (End cleanup on rustdoc-js tools) - #70990 (Improve rustdoc source code a bit) - #71145 (Add illumos triple) - #71166 (Clean up E0518 explanation) Failed merges: r? @ghost
- Loading branch information
Showing
41 changed files
with
1,123 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions}; | ||
use std::default::Default; | ||
|
||
pub fn opts() -> TargetOptions { | ||
let mut late_link_args = LinkArgs::new(); | ||
late_link_args.insert( | ||
LinkerFlavor::Gcc, | ||
vec![ | ||
// LLVM will insert calls to the stack protector functions | ||
// "__stack_chk_fail" and "__stack_chk_guard" into code in native | ||
// object files. Some platforms include these symbols directly in | ||
// libc, but at least historically these have been provided in | ||
// libssp.so on illumos and Solaris systems. | ||
"-lssp".to_string(), | ||
], | ||
); | ||
|
||
TargetOptions { | ||
dynamic_linking: true, | ||
executables: true, | ||
has_rpath: true, | ||
target_family: Some("unix".to_string()), | ||
is_like_solaris: true, | ||
limit_rdylib_exports: false, // Linker doesn't support this | ||
eliminate_frame_pointer: false, | ||
late_link_args, | ||
|
||
// While we support ELF TLS, rust requires a way to register | ||
// cleanup handlers (in C, this would be something along the lines of: | ||
// void register_callback(void (*fn)(void *), void *arg); | ||
// (see src/libstd/sys/unix/fast_thread_local.rs) that is currently | ||
// missing in illumos. For now at least, we must fallback to using | ||
// pthread_{get,set}specific. | ||
//has_elf_tls: true, | ||
|
||
// FIXME: Currently, rust is invoking cc to link, which ends up | ||
// causing these to get included twice. We should eventually transition | ||
// to having rustc invoke ld directly, in which case these will need to | ||
// be uncommented. | ||
// | ||
// We want XPG6 behavior from libc and libm. See standards(5) | ||
//pre_link_objects_exe: vec![ | ||
// "/usr/lib/amd64/values-Xc.o".to_string(), | ||
// "/usr/lib/amd64/values-xpg6.o".to_string(), | ||
//], | ||
..Default::default() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::spec::{LinkerFlavor, Target, TargetResult}; | ||
|
||
pub fn target() -> TargetResult { | ||
let mut base = super::illumos_base::opts(); | ||
base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string(), "-std=c99".to_string()]); | ||
base.cpu = "x86-64".to_string(); | ||
base.max_atomic_width = Some(64); | ||
|
||
Ok(Target { | ||
// LLVM does not currently have a separate illumos target, | ||
// so we still pass Solaris to it | ||
llvm_target: "x86_64-pc-solaris".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "64".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(), | ||
arch: "x86_64".to_string(), | ||
target_os: "illumos".to_string(), | ||
target_env: String::new(), | ||
target_vendor: "unknown".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
options: base, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.