Commit Graph

35 Commits

Author SHA1 Message Date
bors
6503543d11 Auto merge of #132282 - Noratrieb:it-is-the-end-of-serial, r=cjgillot
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-12 15:14:56 +00:00
Noratrieb
505b8e1332 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!
2024-11-12 13:38:58 +00:00
clubby789
b480f0f224 Remove unused intercrate dependencies 2024-11-07 14:17:16 +00:00
The 8472
5bf8eeb9f3 disable size asserts in the compiler when randomizing layouts 2024-08-31 23:56:45 +02:00
John Kåre Alsaker
3ee43259ac Link std statically in rustc_driver 2024-08-11 04:16:53 +02:00
Michael Goulet
7e1c4afb1d The rustc crate feature is called jemalloc 2024-07-15 13:01:20 -04:00
Michael Goulet
247ad3385c Use dep: for crate dependencies 2024-07-15 12:40:10 -04:00
Martin Nordholts
cde0cde151 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.
2024-05-02 19:48:29 +02:00
Nicholas Nethercote
8ff624a9f2 Clean up rustc_*/Cargo.toml.
- 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-30 08:46:02 +11:00
Oli Scherer
a38e98371b Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things 2023-09-25 14:38:27 +00:00
Matthias Krüger
23815467a2 inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
jyn
e89bd9428f
fix link
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
2023-03-11 10:53:47 -06:00
Joshua Nelson
9a24e2fee9 Expand on the allocator comment in rustc-main
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-03-11 07:49:22 -06:00
John Kåre Alsaker
2aceaf4849 Add a new rustc_driver dylib to rexport rustc_driver_impl 2023-02-02 07:34:41 +01:00
Martin Nordholts
093b075d32 rustc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler
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-10-02 17:49:36 +02:00
Joshua Nelson
033a025b10 Don't rerun the build script for the compiler each time on linux
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-07-10 23:57:25 -05:00
Yuki Okushi
9688594d00
Rollup merge of #97385 - oli-obk:smir-tool-lib, r=pnkfelix
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-14 07:47:24 +09:00
Oli Scherer
9960cc1f08 Ship rustc_smir with rustc 2022-06-02 10:08:38 +00:00
bors
5e6bb83268 Auto merge of #96737 - ChrisDenton:win-manifest, r=wesleywiser
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-06-02 07:58:29 +00:00
Rémy Rakic
adab1350e7 update jemalloc-sys to jemalloc v5.3 2022-05-25 08:25:15 +02:00
Chris Denton
7255bc6338
Add Windows application manifest to rustc-main 2022-05-06 17:16:22 +01:00
klensy
008fc79dcd Propagate parallel_compiler feature through rustc crates. Turned off feature gives change of builded crates: 238 -> 224. 2022-03-28 08:41:12 +03:00
Rémy Rakic
f9e0eb3b94 remove unused jemallocator crate 2022-01-28 16:56:05 +01:00
Nicholas Nethercote
bb23bfc2cd Remove useless #[global_allocator] from rustc and rustdoc.
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-12-23 17:23:21 +11:00
Mark Rousskov
c746be2219 Migrate to 2021 2021-09-20 22:21:42 -04:00
Jade
3cf820e17d rfc3052: Remove authors field from Cargo manifests
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-07-29 14:56:05 -07:00
Gus Wynn
3965773ae7 use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
Dylan DPC
7b78d86d6a
Rollup merge of #82642 - sfackler:jemalloc-zone, r=pnkfelix
Fix jemalloc usage on OSX

Closes #82423
2021-03-08 13:13:22 +01:00
Henry Boisdequin
0ca63ec1f7 Fix typo
we need to actually -> we actually need to

@rustbot label +C-cleanup
2021-03-06 09:16:29 +05:30
Steven Fackler
1b4860ab2a
Update compiler/rustc/src/main.rs 2021-03-05 07:12:02 -05:00
Steven Fackler
6e52b23fa9 Fix jemalloc usage on OSX
Closes #82423
2021-02-28 14:53:21 -05:00
Gus Wynn
0be66d7f30 just max_level_info 2020-09-11 09:37:51 -07:00
Gus Wynn
15aa6f31b9 add debug-logging to config.toml 2020-09-10 16:39:04 -07:00
Vadim Petrochenkov
7dfbf59f10 cleanup: Remove duplicate library names from Cargo.tomls 2020-08-30 22:57:54 +03:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00