about summary refs log tree commit diff
path: root/src/librustc/middle/cstore.rs
AgeCommit message (Collapse)AuthorLines
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-252/+0
2020-03-24normalize some imports, prefer direct ones.Mazdak Farrokhzad-1/+1
2020-03-23Split long derive lists into two derive attributes.Ana-Maria Mihalache-12/+2
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-9/+9
2020-03-02Auto merge of #69432 - petrochenkov:alldeps, r=eddybbors-4/+1
rustc_metadata: Load metadata for indirect macro-only dependencies Imagine this dependency chain between crates ``` Executable crate -> Library crate -> Macro crate ``` where "Library crate" uses the macros from "Macro crate" for some code generation, but doesn't reexport them any further. Currently, when compiling "Executable crate" we don't even load metadata for it, because why would we want to load any metadata from "Macro crate" if it already did all its code generation job when compiling "Library crate". Right? Wrong! Hygiene data and spans (https://github.com/rust-lang/rust/issues/68686, https://github.com/rust-lang/rust/pull/68941) from "Macro crate" still may need to be decoded from "Executable crate". So we'll have to load them properly. Questions: - How this will affect compile times for larger crate trees in practice? How to measure it? Hygiene/span encoding/decoding will necessarily slow down compilation because right now we just don't do some work that we should do, but this introduces a whole new way to slow down things. E.g. loading metadata for `syn` (and its dependencies) when compiling your executable if one of its library dependencies uses it. - We are currently detecting whether a crate reexports macros from "Macro crate" or not, could we similarly detect whether a crate "reexports spans" and keep it unloaded if it doesn't? Or at least "reexports important spans" affecting hygiene, we can probably lose spans that only affect diagnostics.
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-2/+2
2020-02-24rustc_metadata: Load metadata for indirect macro-only dependenciesVadim Petrochenkov-4/+1
2020-01-23Add `-Z no-link` flagVictor Ding-2/+3
Adds a compiler option to allow rustc compile a crate without linking. With this flag, rustc serializes codegen_results into a .rlink file.
2020-01-09add CStore::item_generics_num_lifetimesMazdak Farrokhzad-3/+2
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-2/+2
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-32/+29
2019-12-03Move NativeLibraryKind to rustc_sessionMark Rousskov-15/+1
2019-11-28rustc: Move some queries to `rustc_metadata`Vadim Petrochenkov-5/+1
2019-11-28rustc_metadata: Move `has_global_allocator` from session to cstoreVadim Petrochenkov-0/+1
2019-11-28rustc_metadata: Privatize `CrateMetadata::extern_crate`Vadim Petrochenkov-0/+7
2019-11-11Move allocator_kind to CrateStoreMark Rousskov-0/+2
Similarly to the previous commit, there's no need for this to be in Session and have a Once around it.
2019-11-11Move injected_panic_runtime to CrateStoreMark Rousskov-0/+1
This was essentially a "query" previously (with no key, just always run once when resolving the crate dependencies), and remains so, just now in a way that isn't on Session. This removes the need for the `Once` as well.
2019-10-31Implement dual proc macro hashingmsizanoen-0/+1
This changes the mechanism of `-Z dual-proc-macro` to record the host proc macro hash in the transistive dependency information and use it during dependency resolution instead of resolving only by name.
2019-10-24rustc_metadata: Minimize use of `Lrc` in crate storeVadim Petrochenkov-3/+3
Crate metadatas are still stored as `Lrc<CrateMetadata>` in `CStore` because crate store has to be cloneable due to `Resolver::clone_outputs`.
2019-10-24rustc: Add a convenience alias for `dyn MetadataLoader + Sync`Vadim Petrochenkov-0/+2
2019-10-21Remove many unnecessary trait derivations.Nicholas Nethercote-1/+1
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-1/+0
Use a more traditional scheme with providing them as a resolver output
2019-10-14rustc_metadata: Use `CrateSource` where appropriateVadim Petrochenkov-0/+6
2019-10-07Address review comments.Charles Lew-1/+1
2019-10-07Add feature gate for raw_dylib.Charles Lew-0/+2
2019-10-04metadata: Simplify interface of `resolve_crate`Vadim Petrochenkov-3/+1
2019-09-27getting more context for duplicate lang items (fixes #60561)Tomas Tauber-1/+8
Where possible, the error message includes the name of the crate that brought in the crate with duplicate lang items (which helps with debugging). This information is passed on from cstore using the `extern_crate` query.
2019-08-16CrateStore comment fix.Edd Barrett-2/+1
with -> which , and re-wrap line.
2019-08-11Derive Debug for NativeLibrary and NativeLibraryKindbjorn3-2/+2
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-2/+2
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-6/+2
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-2/+2
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-05-23Update get_lib_features, defined_lib_features, get_lang_items, ↵John Kåre Alsaker-2/+2
defined_lang_items, missing_lang_items, postorder_cnums and maybe_unused_extern_crates
2019-04-14Properly parse '--extern-private' with name and pathAaron Hill-0/+1
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-8/+11
2019-02-05move librustc to 2018Mark Mansi-6/+6
2019-01-13remove extern_in_paths.Mazdak Farrokhzad-1/+1
2018-12-25Remove licensesMark Rousskov-20/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-1/+1
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-08-18Remove LinkMeta structbjorn3-7/+1
2018-08-09Move SVH structure to data structuresMark Rousskov-1/+1
2018-08-03Move unused trait functions to inherent functionsMark Rousskov-18/+0
2018-08-03Store concrete crate stores where possibleMark Rousskov-21/+1
2018-08-03Visibility is now a queryMark Rousskov-1/+0