-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Adjust some #[cfg]
s to take non-Unix non-Windows operating systems into account
#83013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if true
is more suitable here, since returning false
means it will never fallback to an @
-file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. On one hand defaulting to true could cause linking to fail in some cases. On the other hand it would be a slight performance regression that is likely small enough that no-one will investigate, while failed linking would cause people to notice it and patch rustc to add an implementation of command_line_too_big
for their platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it false
for now.
r? @bjorn3 |
@bors r+ |
📌 Commit 00c0872 has been approved by |
@bors rollup=maybe |
Yeah @bors rollup=always |
Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account This makes compilation to such targets (e.g. `wasm32-wasi`) easier. cc rust-lang/miri#722 rust-lang@bb6d1d0#r48100619
Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account This makes compilation to such targets (e.g. `wasm32-wasi`) easier. cc rust-lang/miri#722 rust-lang@bb6d1d0#r48100619
Rollup of 11 pull requests Successful merges: - rust-lang#80385 (Clarify what `Cell::replace` returns) - rust-lang#82571 (Rustdoc Json: Add tests for Reexports, and improve jsondocck) - rust-lang#82860 (Add `-Z unpretty` flag for the THIR) - rust-lang#82950 (convert slice doc link to intra-doc links) - rust-lang#82965 (Add spirv extension handling in compiletest) - rust-lang#82966 (update MSYS2 link in README) - rust-lang#82979 (Fix "run" button position in error index) - rust-lang#83001 (Ignore Vim swap files) - rust-lang#83003 (rustdoc: tweak the search index format) - rust-lang#83013 (Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account) - rust-lang#83018 (Reintroduce accidentally deleted assertions.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This makes compilation to such targets (e.g.
wasm32-wasi
) easier.cc rust-lang/miri#722 bb6d1d0#r48100619