about summary refs log tree commit diff
path: root/compiler/rustc_metadata/src/locator.rs
AgeCommit message (Collapse)AuthorLines
2021-10-05Rollup merge of #89546 - joshtriplett:grow-metadata-faster, r=petrochenkovManish Goregaokar-1/+3
Make an initial guess for metadata size to reduce buffer resizes When reading metadata, the compiler starts with a `Vec::new()`, which will need to grow repeatedly as the metadata gets decompressed into it. Reduce the number of resizes by starting out at the size of the compressed data.
2021-10-05Auto merge of #89266 - cjgillot:session-ich, r=michaelwoeristerbors-1/+1
Move ICH to rustc_query_system Based on https://github.com/rust-lang/rust/pull/89183 The StableHashingContext does not need to be in rustc_middle. This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
2021-10-04Make an initial guess for metadata size to reduce buffer resizesJosh Triplett-1/+3
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-1/+1
2021-09-30Recommend running `cargo clean` in E0514 outputpierwill-1/+2
2021-09-10Add help for E0463Guillaume Gomez-0/+5
2021-09-02Introduce CrateRejections structbjorn3-40/+36
2021-09-02Remove root field from CrateLocatorbjorn3-7/+3
2021-09-02Remove host_hash from CrateLocatorbjorn3-4/+0
2021-09-02Refactor CrateLocator.is_proc_macrobjorn3-14/+10
This also fixes a (theoretical) bug where a proc-macro may be loaded as plugin if it exports a symbol with the right name.
2021-09-02Don't store Session in CrateLocatorbjorn3-11/+15
2021-08-10Replace #[plugin_registrar] with exporting __rustc_plugin_registrarbjorn3-4/+4
2021-08-04Add back -Zno-profiler-runtimeAmanieu d'Antras-2/+2
This was removed by #85284 in favor of -Zprofiler-runtime=<name>. However the suggested -Zprofiler-runtime=None doesn't work because "None" is treated as a crate name.
2021-07-24Remove detection of rustup and cargo in 'missing extern crate' diagnosticsJoshua Nelson-2/+5
Previously, this would change the test output when RUSTUP_HOME was set: ``` ---- [ui] ui/issues/issue-49851/compiler-builtins-error.rs stdout ---- diff of stderr: 1 error[E0463]: can't find crate for `core` 2 | 3 = note: the `thumbv7em-none-eabihf` target may not be installed + = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf` 4 5 error: aborting due to previous error 6 ``` Originally, I fixed it by explicitly unsetting RUSTUP_HOME in compiletest. Then I realized that almost no one has RUSTUP_HOME set, since rustup doesn't set it itself; although it does set RUST_RECURSION_COUNT whenever it launches a proxy. Then it was pointed out that this runtime check doesn't really make sense and it's fine to make it unconditional.
2021-07-06Revert "Revert "Merge CrateDisambiguator into StableCrateId""bjorn3-4/+4
This reverts commit 8176ab8bc18fdd7d3c2cf7f720c51166364c33a3.
2021-05-17Provide option for specifying the profiler runtimeAlan Egerton-1/+3
Currently, if `-Zinstrument-coverage` is enabled, the target is linked against the `library/profiler_builtins` crate (which pulls in LLVM's compiler-rt runtime). This option enables backends to specify an alternative runtime crate for handling injected instrumentation calls.
2021-04-25Give a better error when std or core are missingJoshua Nelson-3/+34
- Suggest using `rustup target add` if `RUSTUP_HOME` is set. I don't know if there's any precedent for doing this, but it seems harmless enough and it will be a big help. - Add a note about `#![no_std]` if `std` is missing but not core - On nightly, suggest using `cargo build -Z build-std` if `CARGO` is set - Add a note that std may be unsupported if `std` is missing but not core - Don't suggest `#![no_std]` when the load isn't injected by the compiler
2021-03-30Add an Mmap wrapper to rustc_data_structuresbjorn3-16/+3
This wrapper implements StableAddress and falls back to directly reading the file on wasm32
2021-03-18Upgrade memmap to memmap2 in other crates.Camille GILLOT-2/+2
2021-02-02Let a portion of DefPathHash uniquely identify the DefPath's crate.Michael Woerister-0/+8
This allows to directly map from a DefPathHash to the crate it originates from, without constructing side tables to do that mapping. It also allows to reliably and cheaply check for DefPathHash collisions.
2021-01-29Pre-canoncalize ExternLocation::ExactPathsRyan Levick-8/+16
2020-11-08Collapse all uses of `target.options.foo` into `target.foo`Vadim Petrochenkov-13/+9
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-10-30Fix some more clippy warningsJoshua Nelson-5/+3
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-1/+1
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-08-30mv compiler to compiler/mark-0/+1111