Commit Graph

49 Commits

Author SHA1 Message Date
Michael Goulet
247ad3385c Use dep: for crate dependencies 2024-07-15 12:40:10 -04:00
Urgau
228496e4f5 Improve check-cfg CLI errors with more structured diagnostics 2024-05-06 07:44:41 +02:00
bjorn3
f25c90a83f Unify dylib loading between proc macros and codegen backends
As bonus this makes the errors when failing to load a proc macro more
informative to match the backend loading errors. In addition it makes it
slightly easier to patch rustc to work on platforms that don't support
dynamic linking like wasm.
2024-02-21 11:17:07 +00:00
Simonas Kazlauskas
fcaeb45421 deps: deduplicate the version of libloading used
The changelog can be found here:
https://docs.rs/libloading/latest/libloading/changelog/r0_8_0/index.html
2024-01-10 17:18:10 +02:00
Ben Kimock
fbaa24ee35 Call FileEncoder::finish in rmeta encoding 2023-11-22 22:49:22 -05:00
Nicholas Nethercote
5c462a32bd Remove support for compiler plugins.
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-11-04 08:50:46 +11: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
Nicholas Nethercote
98c469ce93 Remove an unneeded dependency. 2023-10-28 09:03:51 +11:00
Vadim Petrochenkov
7353c96be8 rustc: Move features from Session to GlobalCtxt
Removes two pieces of mutable state.
Follow up to #114622.
2023-08-11 16:51:50 +08:00
klensy
31630859cc replace atty crate with std's isTerminal 2023-07-26 18:09:50 +03:00
Jing Peng
9b1a1e1d95 Write to stdout if - is given as output file
If `-o -` or `--emit KIND=-` is provided, output will be written
to stdout instead. Binary output (`obj`, `llvm-bc`, `link` and
`metadata`) being written this way will result in an error unless
stdout is not a tty. Multiple output types going to stdout will
trigger an error too, as they will all be mixded together.
2023-06-06 17:53:29 -04:00
John Kåre Alsaker
66d85438ca Remove QueryEngine trait 2023-04-26 07:46:13 +02:00
klensy
3338ee3ca7 drop unused deps, gate libc under unix for one crate 2023-04-22 15:22:21 +03:00
Nilstrieb
b5d3d970fa Add rustc_fluent_macro to decouple fluent from rustc_macros
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-04-18 18:56:22 +00:00
John Kåre Alsaker
27c44d2e28 Update indexmap and rayon crates 2023-03-25 02:12:13 +01:00
John Kåre Alsaker
4f7cd3d459 Add try_canonicalize to rustc_fs_util and use it over fs::canonicalize 2023-03-16 21:50:23 +01:00
Oli Scherer
8f132d8549 Run the resolver after TyCtxt construction 2023-02-20 15:28:58 +00:00
klensy
4f5f9f0a13 remove unused imports 2023-02-06 17:40:18 +03:00
David Wood
2575b1abc9 session: diagnostic migration lint on more fns
Apply the diagnostic migration lint to more functions on `Session`.

Signed-off-by: David Wood <david.wood@huawei.com>
2023-01-30 17:11:35 +00:00
Lukas Wirth
549ece7033 Warn when using panic-strategy abort for proc-macro crates 2023-01-13 10:13:49 +01:00
Charles Lew
d15b020278 Enable icu sync feature for parallel compiler 2022-11-18 14:46:35 -08:00
Onur Özkan
71a3a48ee5 improve filesearch::get_or_default_sysroot r=ozkanonur
Signed-off-by: Onur Özkan <work@onurozkan.dev>
2022-11-04 17:06:47 +03:00
lcnr
fb3ab13a1c rustc_hir_typeck: fix paths and partially mv files 2022-10-20 17:53:14 +02:00
reez12g
9a4c5abe45 Remove from compiler/ crates 2022-09-29 16:49:04 +09:00
lcnr
1fc86a63f4 rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00
finalchild
c1a98416e3 Migrate emoji identifier diagnostics to SessionDiagnostic 2022-08-17 05:07:47 +09:00
Yoshiki Matsuda
5d9ba49bb9 move encode_and_write_metadata to rustc_metadata::fs 2022-07-02 22:51:40 +09:00
Nicholas Nethercote
7c40661ddb Update smallvec to 1.8.1.
This pulls in https://github.com/servo/rust-smallvec/pull/282, which
gives some small wins for rustc.
2022-06-27 08:48:55 +10:00
klensy
4ea4e2e76d remove currently unused deps 2022-06-13 22:20:51 +03:00
Josh Stone
ab57e36268 Update to rebased rustc-rayon 0.4 2022-05-27 20:20:41 -07: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
Josh Stone
f3b8812f24 Update rayon and rustc-rayon 2022-01-10 11:34:07 -08:00
Andy Russell
923f939791
replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
Mark Rousskov
c746be2219 Migrate to 2021 2021-09-20 22:21:42 -04:00
Camille GILLOT
c5fc2609f0 Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
Camille GILLOT
81a600b6b7 Move monomorphize code to its own crate. 2021-09-07 19:53:04 +02:00
Camille GILLOT
bba4be681d Move rustc_mir::transform to rustc_mir_transform. 2021-09-07 00:43:14 +02:00
Camille GILLOT
31a61ccc38 Move rustc_mir::borrow_check to new crate rustc_borrowck. 2021-09-07 00:29:22 +02: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
Josh Triplett
b836ecd83a rustc_interface: Remove unused dependency rustc_index
Unused since commit cd7a011f37
("Don't duplicate the extern providers once for each crate").
2021-06-25 01:12:59 -07:00
Jubilee Young
b2c1dbbd33 Use tempfile 2021-04-23 15:33:57 -07:00
Josh Stone
f7e75a2124 Update to rustc-rayon 0.3.1
This pulls in rust-lang/rustc-rayon#8 to fix #81425. (h/t @ammaraskar)

That revealed weak constraints on `rustc_arena::DropArena`, because its
`DropType` was holding type-erased raw pointers to generic `T`. We can
implement `Send` for `DropType` (under `cfg(parallel_compiler)`) by
requiring all `T: Send` before they're type-erased.
2021-03-10 17:53:35 -08:00
Camille GILLOT
4581d16bcb Move the query system to rustc_query_impl. 2021-02-19 17:51:58 +01:00
Camille GILLOT
a4b1158f78 Move handle_deadlock where it is used. 2021-02-19 17:51:55 +01:00
Camille GILLOT
5d71b99690 Make QueryEngine opaque to TyCtxt. 2021-02-19 17:51:54 +01:00
klensy
93c8ebe022 bumped smallvec deps 2021-02-14 18:03:11 +03:00
LeSeulArtichaut
f59d03038c Move rustc_ty -> rustc_ty_utils 2020-11-19 21:57:29 +01:00
marmeladema
bd49eec3d7 interface: use OnceCell from standard library 2020-09-01 22:06:39 +01:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00