about summary refs log tree commit diff
path: root/compiler/rustc
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-05compiler: Add Windows resources to rustc-main and rustc_driverAleksey Kliger-1/+20
Adds Windows resources with the rust version information to rustc-main.exe and rustc_driver.dll Sets the product description to "Rust Compiler" or "Rust Compiler (channel)" for non-stable channels
2025-07-14rename `stable_mir` to `rustc_public`, and `rustc_smir` to `rustc_public_bridge`Makai-4/+4
2025-07-11Avoid building C++ for rustc_llvm with --compile-time-depsbjorn3-0/+1
This saves about 30s.
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-22Fix overcapturing, unsafe extern blocks, and new unsafe opsMichael Goulet-1/+1
2025-02-22Upgrade the compiler to edition 2024Michael Goulet-1/+1
2024-12-03switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0Rémy Rakic-3/+5
2024-11-12Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillotbors-1/+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-1/+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-07Remove unused intercrate dependenciesclubby789-0/+2
2024-08-31disable size asserts in the compiler when randomizing layoutsThe 8472-0/+1
2024-08-11Link `std` statically in `rustc_driver`John Kåre Alsaker-0/+3
2024-07-15The rustc crate feature is called jemallocMichael Goulet-1/+1
2024-07-15Use dep: for crate dependenciesMichael Goulet-1/+1
2024-05-02Change `SIGPIPE` ui from `#[unix_sigpipe = "..."]` to `-Zon-broken-pipe=...`Martin Nordholts-3/+0
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.
2023-10-30Clean up `rustc_*/Cargo.toml`.Nicholas Nethercote-3/+10
- 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-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-0/+1
usage of forever unstable things
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-1/+1
2023-03-11fix linkjyn-1/+1
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
2023-03-11Expand on the allocator comment in `rustc-main`Joshua Nelson-0/+9
Before, it said "global_allocator does nothing". Now it gives you suggestions for what to do if you want to change the global allocator (which is likely the main reason you'd be reading the comment).
2023-02-02Add a new `rustc_driver` dylib to rexport `rustc_driver_impl`John Kåre Alsaker-3/+4
2022-10-02rustc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`Martin Nordholts-1/+3
This is the first (known) step towards starting to use `unix_sigpipe` in the wild. Eventually, `rustc_driver::set_sigpipe_handler` can be removed and all clients can use `unix_sigpipe` instead. For now we just start using `unix_sigpipe` in once place: `rustc` itself. It is easy to manually verify this change. If you remove `#[unix_sigpipe = "sig_dfl"]` and run `./x.py build` you will get an ICE when you do `./build/x86_64-unknown-linux-gnu/stage1/bin/rustc --help | false`. Add back `#[unix_sigpipe = "sig_dfl"]` and the ICE disappears again.
2022-07-10Don't rerun the build script for the compiler each time on linuxJoshua Nelson-0/+3
In practice, this doesn't matter very much because the script takes ~no time to run. But this makes `CARGO_LOG=info` easier to read, and theoretically saves a few milliseconds.
2022-06-14Rollup merge of #97385 - oli-obk:smir-tool-lib, r=pnkfelixYuki Okushi-0/+3
Add WIP stable MIR crate r? ``@pnkfelix`` Discussion about this happend in the SMIR meeting yesterday. Some info can be found at https://rust-lang.zulipchat.com/#narrow/stream/320896-project-stable-mir/topic/dev.20plan.20mtg/near/283774691
2022-06-02Ship rustc_smir with rustcOli Scherer-0/+3
2022-06-02Auto merge of #96737 - ChrisDenton:win-manifest, r=wesleywiserbors-0/+52
Add Windows application manifest to rustc-main Windows allows setting some runtime options using a manifest file. The format of the XML file is documented here: https://docs.microsoft.com/en-us/windows/win32/sbscs/application-manifests The manifest file in this PR does three things: * Declares which Windows versions we support. This may help avoid unnecessary compatibility shims. * Uses the UTF-8 code page. While Rust itself uses UTF-16 APIs, other code may rely on the code page. * Makes the application long path aware (if also enabled by the user). This allows for the current directory to be longer than `PATH_MAX`. These changes only affect the `rustc` process and not any other DLLs or compiled programs.
2022-05-25update jemalloc-sys to jemalloc v5.3Rémy Rakic-6/+4
2022-05-06Add Windows application manifest to rustc-mainChris Denton-0/+52
2022-03-28Propagate `parallel_compiler` feature through rustc crates. Turned off ↵klensy-0/+1
feature gives change of builded crates: 238 -> 224.
2022-01-28remove unused `jemallocator` crateRémy Rakic-5/+1
2021-12-23Remove useless `#[global_allocator]` from rustc and rustdoc.Nicholas Nethercote-17/+24
This was added in #83152, which has several errors in its comments. This commit also fix up the comments, which are quite wrong and misleading.
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-07-29rfc3052: Remove authors field from Cargo manifestsJade-1/+0
Since RFC 3052 soft deprecated the authors field anyway, hiding it from crates.io, docs.rs, and making Cargo not add it by default, and it is not generally up to date/useful information, we should remove it from crates in this repo.
2021-04-04use jemallocator in rustc/rustdocGus Wynn-4/+21
2021-03-08Rollup merge of #82642 - sfackler:jemalloc-zone, r=pnkfelixDylan DPC-0/+14
Fix jemalloc usage on OSX Closes #82423
2021-03-06Fix typoHenry Boisdequin-1/+1
we need to actually -> we actually need to @rustbot label +C-cleanup
2021-03-05Update compiler/rustc/src/main.rsSteven Fackler-1/+1
2021-02-28Fix jemalloc usage on OSXSteven Fackler-0/+14
Closes #82423
2020-09-11just max_level_infoGus Wynn-1/+1
2020-09-10add debug-logging to config.tomlGus Wynn-0/+1
2020-08-30cleanup: Remove duplicate library names from `Cargo.toml`sVadim Petrochenkov-4/+0
2020-08-30mv compiler to compiler/mark-0/+56