diff options
| author | Martin Nordholts <martin.nordholts@codetale.se> | 2024-04-28 18:02:21 +0200 |
|---|---|---|
| committer | Martin Nordholts <martin.nordholts@codetale.se> | 2024-05-02 19:48:29 +0200 |
| commit | cde0cde151f30e07170d0f3caa721c92bebd7afe (patch) | |
| tree | f065e316178196507ba419727c37562cdf7f828e /compiler/rustc | |
| parent | e27af2917b80487e9c0de00118fdcb9ccb1177f9 (diff) | |
| download | rust-cde0cde151f30e07170d0f3caa721c92bebd7afe.tar.gz rust-cde0cde151f30e07170d0f3caa721c92bebd7afe.zip | |
Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...`
In the stabilization attempt of `#[unix_sigpipe = "sig_dfl"]`, a concern was raised related to using a language attribute for the feature: Long term, we want `fn lang_start()` to be definable by any crate, not just libstd. Having a special language attribute in that case becomes awkward. So as a first step towards towards the next stabilization attempt, this PR changes the `#[unix_sigpipe = "..."]` attribute to a compiler flag `-Zon-broken-pipe=...` to remove that concern, since now the language is not "contaminated" by this feature. Another point was also raised, namely that the ui should not leak **how** it does things, but rather what the **end effect** is. The new flag uses the proposed naming. This is of course something that can be iterated on further before stabilization.
Diffstat (limited to 'compiler/rustc')
| -rw-r--r-- | compiler/rustc/src/main.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc/src/main.rs b/compiler/rustc/src/main.rs index 434b978ae31..7ba58406ef1 100644 --- a/compiler/rustc/src/main.rs +++ b/compiler/rustc/src/main.rs @@ -1,5 +1,3 @@ -#![feature(unix_sigpipe)] - // A note about jemalloc: rustc uses jemalloc when built for CI and // distribution. The obvious way to do this is with the `#[global_allocator]` // mechanism. However, for complicated reasons (see @@ -34,7 +32,6 @@ // https://github.com/rust-lang/rust/commit/b90cfc887c31c3e7a9e6d462e2464db1fe506175#diff-43914724af6e464c1da2171e4a9b6c7e607d5bc1203fa95c0ab85be4122605ef // for an example of how to do so. -#[unix_sigpipe = "sig_dfl"] fn main() { // See the comment at the top of this file for an explanation of this. #[cfg(feature = "jemalloc-sys")] |
