about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/Cargo.toml
AgeCommit message (Collapse)AuthorLines
2025-09-15Make llvm_enzyme a regular cargo featurebjorn3-0/+1
This makes it clearer that it is set by the build system rather than by the rustc that compiles the current rustc. It also avoids bootstrap needing to pass --check-cfg llvm_enzyme to rustc.
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-3/+3
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-28Add `libc` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-27Add `tracing` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-07-31Tidy up `Cargo.toml` files.Nicholas Nethercote-1/+1
- Add some missing `tidy-alphabetical-*` markers. - Remove some unnecessary blank lines.
2025-07-14rename `stable_mir` to `rustc_public`, and `rustc_smir` to `rustc_public_bridge`Makai-1/+1
2025-07-11Avoid building C++ for rustc_llvm with --compile-time-depsbjorn3-0/+1
This saves about 30s.
2025-05-17compiler & tools: bump windows crate to dedupe versionsklensy-1/+1
2025-04-30Change rustc_driver dependency on stable_mir crateCelina G. Val-1/+1
This fixes issues with RustAnalyzer not finding stable_mir crate. It is also part of the long term architecture plan for these crates, since we are moving towards having stable_mir depend on rustc_smir and not the other way around. I believe this is an utility function that will come handy eventually for stable_mir users, but I'm keeping it as part of rustc_internal since it initializes the StableMir context and requires `TyCtxt`. Finally, I added the rustc_internal crate under a feature since the APIs from this module shall not be stabilized.
2025-04-05Switch `time` to `jiff` for time formatting in ICE dumpsclubby789-1/+1
2025-03-20Use `-Wunused_crate_dependencies` for compiler crates.Nicholas Nethercote-1/+1
It's very useful. There are some false positives involving integration tests in `rustc_pattern_analysis` and `rustc_serialize`. There is also a false positive involving `rustc_driver_impl`'s `rustc_randomized_layouts` feature. And I removed a `rustc_span` mention in a doc comment in `rustc_log` because it wasn't integral to the comment but caused a dev-dependency.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-3/+0
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Specify rust lints for `compiler/` crates via Cargo.Nicholas Nethercote-0/+3
By naming them in `[workspace.lints.rust]` in the top-level `Cargo.toml`, and then making all `compiler/` crates inherit them with `[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`, because they're a bit different.) The advantages of this over the current approach: - It uses a standard Cargo feature, rather than special handling in bootstrap. So, easier to understand, and less likely to get accidentally broken in the future. - It works for proc macro crates. It's a shame it doesn't work for rustc-specific lints, as the comments explain.
2025-02-22Upgrade the compiler to edition 2024Michael Goulet-1/+1
2025-02-09compiler: remove rustc_target::spec::abi reexportsJubilee Young-0/+1
2025-01-21bumpt compiler and tools to windows 0.59klensy-1/+1
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-1/+1
2024-11-12Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillotbors-5/+0
Delete the `cfg(not(parallel))` serial compiler Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon! #113349 Note that the default is still 1 thread, as more than 1 thread is still fairly broken. cc `@onur-ozkan` to see if i did the bootstrap field removal correctly, `@SparrowLii` on the sync parts
2024-11-12Delete the `cfg(not(parallel))` serial compilerNoratrieb-5/+0
Since it's inception a long time ago, the parallel compiler and its cfgs have been a maintenance burden. This was a necessary evil the allow iteration while not degrading performance because of synchronization overhead. But this time is over. Thanks to the amazing work by the parallel working group (and the dyn sync crimes), the parallel compiler has now been fast enough to be shipped by default in nightly for quite a while now. Stable and beta have still been on the serial compiler, because they can't use `-Zthreads` anyways. But this is quite suboptimal: - the maintenance burden still sucks - we're not testing the serial compiler in nightly Because of these reasons, it's time to end it. The serial compiler has served us well in the years since it was split from the parallel one, but it's over now. Let the knight slay one head of the two-headed dragon!
2024-11-03make time format parsing compiletimeklensy-1/+1
2024-09-27bump few depsklensy-1/+1
cargo_metadata, thorin-dwp, windows
2024-08-31disable size asserts in the compiler when randomizing layoutsThe 8472-0/+5
2024-06-10Remove some unused crate dependencies.Nicholas Nethercote-1/+0
I found these by setting the `unused_crate_dependencies` lint temporarily to `Warn`.
2024-05-04compiler: upgrade time from 0.3.34 to 0.3.36Caleb Sander-1/+1
This ensures the version of time used in rustc includes this change: https://github.com/time-rs/time/pull/671. This fix is a necessary prerequisite for #99969, which adds FromIterator implementations for Box<str>. Previously, time had an Into::into that resolved to the identity impl followed by a collect::<Result<Box<_>, _>>(). With the new FromIterator implementations for Box<str>, the Into::into resolution is ambiguous and time fails to compile. The fix removes the identity Into::into conversion, allowing time to compile with the new FromIterator implementations. This version of time also matches what cargo recently switched to in https://github.com/rust-lang/cargo/pull/13834.
2024-05-03Fix `Cargo.toml` whitespace.Nicholas Nethercote-1/+1
2024-05-03Remove some unneeded `Cargo.toml` dependencies.Nicholas Nethercote-1/+0
I found these with a hacky shell script.
2024-04-11Disable Ctrl-C handling on WASMbjorn3-1/+5
WASM fundamentally doesn't support signals. If WASI ever gets support for notifying the guest process of a Ctrl-C that happened, this would have to be done through the guest process polling for the signal, which will require thread support in WASI too to be compatible with the api provided by the ctrlc crate.
2024-03-17Print a backtrace in const eval if interruptedBen Kimock-0/+1
2024-02-27Hint user to update nightly on ICEs produced from outdated nightly许杰友 Jieyou Xu (Joe)-1/+1
2024-02-18windows bump to 0.52klensy-1/+1
2024-01-29Stop using `String` for error codes.Nicholas Nethercote-1/+0
Error codes are integers, but `String` is used everywhere to represent them. Gross! This commit introduces `ErrCode`, an integral newtype for error codes, replacing `String`. It also introduces a constant for every error code, e.g. `E0123`, and removes the `error_code!` macro. The constants are imported wherever used with `use rustc_errors::codes::*`. With the old code, we have three different ways to specify an error code at a use point: ``` error_code!(E0123) // macro call struct_span_code_err!(dcx, span, E0123, "msg"); // bare ident arg to macro call \#[diag(name, code = "E0123")] // string struct Diag; ``` With the new code, they all use the `E0123` constant. ``` E0123 // constant struct_span_code_err!(dcx, span, E0123, "msg"); // constant \#[diag(name, code = E0123)] // constant struct Diag; ``` The commit also changes the structure of the error code definitions: - `rustc_error_codes` now just defines a higher-order macro listing the used error codes and nothing else. - Because that's now the only thing in the `rustc_error_codes` crate, I moved it into the `lib.rs` file and removed the `error_codes.rs` file. - `rustc_errors` uses that macro to define everything, e.g. the error code constants and the `DIAGNOSTIC_TABLES`. This is in its new `codes.rs` file.
2024-01-08Add support for shell argfilesDavid Koloski-0/+1
2023-12-11Extract exhaustiveness into its own crateNadrieril-0/+1
2023-11-26Remove unnecessary dependencies.Nicholas Nethercote-1/+0
2023-11-17better formatting for statementsOğuz Ağcayazı-1/+1
2023-11-17emit basic smirOğuz Ağcayazı-0/+1
2023-11-04Remove support for compiler plugins.Nicholas Nethercote-1/+0
They've been deprecated for four years. This commit includes the following changes. - It eliminates the `rustc_plugin_impl` crate. - It changes the language used for lints in `compiler/rustc_driver_impl/src/lib.rs` and `compiler/rustc_lint/src/context.rs`. External lints are now called "loaded" lints, rather than "plugins" to avoid confusion with the old plugins. This only has a tiny effect on the output of `-W help`. - E0457 and E0498 are no longer used. - E0463 is narrowed, now only relating to unfound crates, not plugins. - The `plugin` feature was moved from "active" to "removed". - It removes the entire plugins chapter from the unstable book. - It removes quite a few tests, mostly all of those in `tests/ui-fulldeps/plugin/`. Closes #29597.
2023-10-30Clean up `rustc_*/Cargo.toml`.Nicholas Nethercote-2/+4
- Sort dependencies and features sections. - Add `tidy` markers to the sorted sections so they stay sorted. - Remove empty `[lib`] sections. - Remove "See more keys..." comments. Excluded files: - rustc_codegen_{cranelift,gcc}, because they're external. - rustc_lexer, because it has external use. - stable_mir, because it has external use.
2023-10-17Use `YYYY-MM-DDTHH_MM_SS` as datetime format for ICE dump filesEsteban Küber-1/+1
Windows paths do not support `:`, so use a datetime format in ICE dump paths that Windows will accept. Fix #116809, fix #115180.
2023-10-06Sort `rustc_driver_impl` dependencies.Nicholas Nethercote-26/+28
As per https://github.com/rust-lang/rust/blob/master/src/doc/style-guide/src/cargo.md, which says: > Sort key names alphabetically within each section, with the exception > of the [package] section. And use tidy to enforce it.
2023-07-19On nightly, dump ICE backtraces to diskEsteban Küber-0/+1
Implement rust-lang/compiler-team#578. When an ICE is encountered on nightly releases, the new rustc panic handler will also write the contents of the backtrace to disk. If any `delay_span_bug`s are encountered, their backtrace is also added to the file. The platform and rustc version will also be collected.
2023-05-09bump windows crate 0.46 -> 0.48 in workspaceklensy-1/+1
2023-05-02Migrate `mir_transform` to translatable diagnosticsclubby789-2/+6
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-0/+1
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-2/+5
2023-02-22errors: generate typed identifiers in each crateDavid Wood-0/+21
Instead of loading the Fluent resources for every crate in `rustc_error_messages`, each crate generates typed identifiers for its own diagnostics and creates a static which are pulled together in the `rustc_driver` crate and provided to the diagnostic emitter. Signed-off-by: David Wood <david.wood@huawei.com>
2023-02-16Remove save-analysis.Nicholas Nethercote-1/+0
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2023-02-02Add a new `rustc_driver` dylib to rexport `rustc_driver_impl`John Kåre Alsaker-2/+1
2023-02-02Rename rustc_driver to rustc_driver_implJohn Kåre Alsaker-0/+45