summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-05-22Use `OnceCell` instead of `Once`Dylan MacKenzie-1/+1
2020-05-11rustc_driver::main: more informative return typeRalf Jung-2/+2
2020-05-10rustc_driver: factor out computing the exit codeRalf Jung-7/+12
2020-04-26fix more clippy warningsMatthias Krüger-3/+3
clippy::{redundant_pattern_matching, clone_on_copy, iter_cloned_collect, option_as_ref_deref, match_ref_pats}
2020-04-19Make option type descriptions non-optional.Nicholas Nethercote-20/+5
Because all options now can take a value. This simplifies some code quite a bit.
2020-04-11Depend on getopts from crates.ioLuca Barbieri-1/+1
rustc_session exports it for other crates to avoid mismatching crate versions.
2020-04-11Depend on libc from crates.ioLuca Barbieri-2/+0
2020-04-04comment refers to removed typeTshepang Lekhonkhobe-1/+0
Was removed in 51938c61f6f1b26e463f9071716f543543486e72
2020-04-02use direct import for ErrorReportedMazdak Farrokhzad-5/+2
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-3/+3
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-3/+3
2020-03-21Rollup merge of #69965 - mark-i-m:codegen-utils, r=eddybMazdak Farrokhzad-11/+7
Refactorings to get rid of rustc_codegen_utils r? @eddyb cc #45276 After this, the only modules left in `rustc_codegen_utils` are - `link`: a bunch of linking-related functions (many dealing with file names). These are mostly consumed by save analysis, rustc_driver, rustc_interface, and of course codegen. I assume they live here because we don't want a dependency of save analysis on codegen... Perhaps they can be moved to librustc? - ~`symbol_names` and `symbol_names_test`: honestly it seems odd that `symbol_names_test` is not a submodule of `symbol_names`. It seems like these could honestly live in their own crate or move to librustc. Already name mangling is exported as the `symbol_name` query.~ (move it to its own crate) I don't mind doing either of the above as part of this PR or a followup if you want.
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-1/+1
2020-03-19Refactorings to begin getting rid of rustc_codegen_utilsMark Mansi-11/+7
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-6/+6
2020-03-14Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPCYuki Okushi-6/+1
fix more clippy findings * reduce references on match patterns (clippy::match_ref_pats) * Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline) * libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string) * remove unneeded mutable references (cippy::unnecessary_mut_passed) * libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast) * rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) * call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref) * iterate over a maps values directly. (clippy::for_kv_map) * rustdoc: simplify boolean condition (clippy::nonminimal_bool) * Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) * rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some) * rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)
2020-03-08Rollup merge of #69608 - o01eg:expose-target-libdir-print, r=ehussMazdak Farrokhzad-0/+4
Expose target libdir information via print command With custom libdir it is required to have an access to library placement. See https://github.com/RazrFalcon/cargo-bloat/issues/51
2020-03-07Use ?-operator in more places (clippy::question_mark, had some false ↵Matthias Krüger-6/+1
negatives fixed recently)
2020-03-02Auto merge of #69442 - jakevossen5:master, r=Mark-Simulacrumbors-6/+10
`--explain` disambiguates no long description and invalid error codes Closes #44710 First code contribution here, so feedback is very much appreciated! cc @zackmdavis cc @Mark-Simulacrum
2020-03-01Expose target libdir information via print command.O01eg-0/+4
With custom libdir it is required to have an access to library placement.
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29added `try_find_description` to distinguish no desc from invalid codeJake Vossen-6/+10
2020-02-28Rollup merge of #69541 - dotdash:format, r=Mark-SimulacrumMazdak Farrokhzad-1/+1
Remove unneeded calls to format!()
2020-02-27Remove unneeded calls to format!()Björn Steinbrink-1/+1
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-02-12Rollup merge of #69059 - ljedrz:unused_stuff, r=Dylan-DPCDylan DPC-4/+0
Remove a few unused objects As far as I can tell, these won't be missed: - `infer::region_constraints::ConstraintInfo` - `driver::DefaultCallbacks` - ~~`hir::intravisit::ParDeepVisitor`~~
2020-02-12Rollup merge of #68487 - 0dvictor:nolink, r=tmandryYuki Okushi-4/+35
[experiment] Support linking from a .rlink file Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file. Part of Issue #64191
2020-02-12remove some unused objectsljedrz-4/+0
2020-02-11Support linking from a .rlink fileVictor Ding-4/+35
Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.
2020-02-04Remove unused feature gates from librustc_driverbjorn3-5/+0
2020-01-15Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichtonYuki Okushi-13/+5
use winapi for non-stdlib Windows bindings
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-13/+5
2020-01-11move rustc::lint::{context, passes} to rustc_lint.Mazdak Farrokhzad-7/+6
Also do some cleanup of the interface.
2020-01-11Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiserMazdak Farrokhzad-0/+2
Add some missing timers Based on https://github.com/rust-lang/rust/pull/67988 r? @wesleywiser
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-7/+7
2020-01-09Tweak timersJohn Kåre Alsaker-1/+0
2020-01-09Label unmarked timeJohn Kåre Alsaker-0/+3
2020-01-09Change -Z time event naming scheme and make them generic activitiesJohn Kåre Alsaker-1/+1
2020-01-08Remove `-Z continue-parse-after-error`Vadim Petrochenkov-1/+0
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-3/+3
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-22Format the worldMark Rousskov-259/+254
2019-12-11Fix fallout from rebaseAaron Hill-2/+0
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-2/+4
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-12-03Move early lint declarations to librustc_sessionMark Rousskov-1/+1
2019-12-01Rollup merge of #66896 - RalfJung:queries, r=ZoxcMazdak Farrokhzad-7/+19
pass Queries to compiler callbacks https://github.com/rust-lang/rust/pull/66791 made it impossible to access the tcx in the callbacks; this should fix that. r? @Zoxc
2019-11-30Rollup merge of #66895 - Centril:rustc_feature, r=oli-obkMazdak Farrokhzad-15/+9
Feature gating *declarations* => new crate `rustc_feature` This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`. The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`. Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in #66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out. The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit. r? @oli-obk cc @petrochenkov cc @Mark-Simulacrum
2019-11-30pass Queries to compiler callbacksRalf Jung-7/+19
2019-11-30move UnstableFeatures -> rustc_featureMazdak Farrokhzad-4/+2