about summary refs log tree commit diff
path: root/compiler/rustc_session/src/config
AgeCommit message (Collapse)AuthorLines
2025-01-06Rollup merge of #131830 - hoodmane:emscripten-wasm-eh, r=workingjubileeJacob Pratt-0/+5
Add support for wasm exception handling to Emscripten target This is a draft because we need some additional setting for the Emscripten target to select between the old exception handling and the new exception handling. I don't know how to add a setting like that, would appreciate advice from Rust folks. We could maybe choose to use the new exception handling if `Ctarget-feature=+exception-handling` is passed? I tried this but I get errors from llvm so I'm not doing it right.
2025-01-06Add support for wasm exception handling to Emscripten targetHood Chatham-0/+5
Gated behind an unstable `-Z emscripten-wasm-eh` flag
2025-01-02Make the `test` cfg a "userspace" check-cfgUrgau-2/+5
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-1/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-12-11generalize 'forbidden feature' concept so that even (un)stable feature can ↵Ralf Jung-1/+1
be invalid to toggle Also rename some things for extra clarity
2024-11-18Overhaul the `-l` option parser (for linking to native libs)Zalathar-116/+218
2024-11-18Move `-l` option parsing into its own submoduleZalathar-0/+140
No functional change (yet).
2024-11-05Auto merge of #129884 - RalfJung:forbidden-target-features, r=workingjubileebors-2/+3
mark some target features as 'forbidden' so they cannot be (un)set with -Ctarget-feature The context for this is https://github.com/rust-lang/rust/issues/116344: some target features change the way floats are passed between functions. Changing those target features is unsound as code compiled for the same target may now use different ABIs. So this introduces a new concept of "forbidden" target features (on top of the existing "stable " and "unstable" categories), and makes it a hard error to (un)set such a target feature. For now, the x86 and ARM feature `soft-float` is on that list. We'll have to make some effort to collect more relevant features, and similar features from other targets, but that can happen after the basic infrastructure for this landed. (These features are being collected in https://github.com/rust-lang/rust/issues/131799.) I've made this a warning for now to give people some time to speak up if this would break something. MCP: https://github.com/rust-lang/compiler-team/issues/780
2024-11-04mark some target features as 'forbidden' so they cannot be (un)setRalf Jung-2/+3
For now, this is just a warning, but should become a hard error in the future
2024-11-02Rename target triple to target tuple in many places in the compilerNoratrieb-2/+2
This changes the naming to the new naming, used by `--print target-tuple`. It does not change all locations, but many.
2024-10-27compiler: Add rustc_abi dependence to the compilerJubilee Young-1/+1
Depend on rustc_abi in compiler crates that use it indirectly but have not yet taken on that dependency, and are not entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
2024-10-02Adjust check-cfg get_many_mut usage following API changeUrgau-12/+12
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-4/+4
2024-08-28fmt-debug optionKornel-1/+18
Allows disabling `fmt::Debug` derive and debug formatting.
2024-08-07Disallow setting built-in cfgs via set the command-lineUrgau-0/+65
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-05Add `rustfmt` cfg to well known cfgs listUrgau-3/+5
2024-05-02Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...`Martin Nordholts-1/+1
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.
2024-04-15Move --check-cfg documentation to stable booksUrgau-1/+1
2024-04-06Put checks that detect UB under their own flag below debug_assertionsBen Kimock-0/+6
2024-04-05Move cfg and check-cfg configuration in it's own module and add docsUrgau-0/+373
2024-01-12update paths in commentsjoboet-2/+2
2022-10-20Change process spawning to inherit the parent's signal mask by defaultRain-5/+8
Previously, the signal mask is always reset when a child process is started. This breaks tools like `nohup` which expect `SIGHUP` to be blocked. With this change, the default behavior changes to inherit the signal mask. This also changes the signal disposition for `SIGPIPE` to only be changed if the `#[unix_sigpipe]` attribute isn't set.
2022-08-31unix_sigpipe: Inline compiler sigpipe constants in stdMartin Nordholts-0/+2
2022-08-28Support `#[unix_sigpipe = "inherit|sig_dfl|sig_ign"]` on `fn main()`Martin Nordholts-0/+20
This makes it possible to instruct libstd to never touch the signal handler for `SIGPIPE`, which makes programs pipeable by default (e.g. with `./your-program | head -n 1`) without `ErrorKind::BrokenPipe` errors.