diff options
| author | hyd-dev <yd-huang@outlook.com> | 2021-03-11 18:03:32 +0800 |
|---|---|---|
| committer | hyd-dev <yd-huang@outlook.com> | 2021-03-11 18:03:32 +0800 |
| commit | 00c08727c888e493baf2fa625970a357fe998414 (patch) | |
| tree | acb7f75b8159024013a75820117c5683ede60589 | |
| parent | 04fce73196638cbb203e2b0dd2a16230ff6e265b (diff) | |
| download | rust-00c08727c888e493baf2fa625970a357fe998414.tar.gz rust-00c08727c888e493baf2fa625970a357fe998414.zip | |
Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index caa6a6a8e3a..b11821b7db0 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -711,7 +711,7 @@ fn link_natively<'a, B: ArchiveBuilder<'a>>( status.signal() == Some(libc::SIGILL) } - #[cfg(windows)] + #[cfg(not(unix))] fn is_illegal_instruction(_status: &ExitStatus) -> bool { false } @@ -1198,7 +1198,7 @@ fn exec_linker( flush_linked_file(&output, out_filename)?; return output; - #[cfg(unix)] + #[cfg(not(windows))] fn flush_linked_file(_: &io::Result<Output>, _: &Path) -> io::Result<()> { Ok(()) } @@ -1238,6 +1238,11 @@ fn exec_linker( err.raw_os_error() == Some(ERROR_FILENAME_EXCED_RANGE) } + #[cfg(not(any(unix, windows)))] + fn command_line_too_big(_: &io::Error) -> bool { + false + } + struct Escape<'a> { arg: &'a str, is_like_msvc: bool, |
