summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2016-04-07Auto merge of #32016 - nikomatsakis:incr-comp-save, r=mwbors-0/+1
Save/load incremental compilation dep graph Contains the code to serialize/deserialize the dep graph to disk between executions. We also hash the item contents and compare to the new hashes. Also includes a unit test harness. There are definitely some known limitations, such as https://github.com/rust-lang/rust/issues/32014 and https://github.com/rust-lang/rust/issues/32015, but I am leaving those for follow-up work. Note that this PR builds on https://github.com/rust-lang/rust/pull/32007, so the overlapping commits can be excluded from review. r? @michaelwoerister
2016-04-06Auto merge of #32230 - GuillaumeGomez:extend_css, r=alexcrichtonbors-49/+4
Add --extend-css option to rustdoc Fixes #32223 r? @brson
2016-04-06make an incremental crateNiko Matsakis-0/+1
for now, this houses `svh` and the code to check `assert_dep_graph` is sane
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-1/+0
2016-04-05Centralize nightly compiler flags handlingGuillaume Gomez-49/+4
2016-03-31allow RUST_BACKTRACE=0 to act as if unsetEmanuel Czirai-1/+4
/# This is a combination of 16 commits. /# The first commit's message is: allow RUST_BACKTRACE=disabled to act as if unset When RUST_BACKTRACE is set to "disabled" then this acts as if the env. var is unset. /# This is the 2nd commit message: case insensitive "DiSaBLeD" RUST_BACKTRACE value previously it expected a lowercase "disabled" to treat the env. var as unset /# This is the 3rd commit message: RUST_BACKTRACE=0 acts as if unset previously RUST_BACKTRACE=disabled was doing the same thing /# This is the 4th commit message: RUST_BACKTRACE=0|n|no|off acts as if unset previously only RUST_BACKTRACE=0 acted as if RUST_BACKTRACE was unset Now added more options (case-insensitive): 'n','no' and 'off' eg. RUST_BACKTRACE=oFF /# This is the 5th commit message: DRY on the value of 2 DRY=don't repeat yourself Because having to remember to keep the two places of '2' in sync is not ideal, even though this is a simple enough case. /# This is the 6th commit message: Revert "DRY on the value of 2" This reverts commit 95a0479d5cf72a2b2d9d21ec0bed2823ed213fef. Nevermind this DRY on 2, because we already have a RY on 1, besides the code is less readable this way... /# This is the 7th commit message: attempt to document unsetting RUST_BACKTRACE /# This is the 8th commit message: curb allocations when checking for RUST_BACKTRACE this means we don't check for case-insensitivity anymore /# This is the 9th commit message: as decided, RUST_BACKTRACE=0 turns off backtrace /# This is the 10th commit message: RUST_TEST_NOCAPTURE=0 acts as if unset (that is, capture is on) Any other value acts as if nocapture is enabled (that is, capture is off) /# This is the 11th commit message: update other RUST_TEST_NOCAPTURE occurrences apparently only one place needs updating /# This is the 12th commit message: update RUST_BACKTRACE in man page /# This is the 13th commit message: handle an occurrence of RUST_BACKTRACE /# This is the 14th commit message: ensure consistency with new rules for backtrace /# This is the 15th commit message: a more concise comment for RUST_TEST_NOCAPTURE /# This is the 16th commit message: update RUST_TEST_NOCAPTURE in man page
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-0/+2
2016-03-29Remove unnecessary dependencies on rustc_llvm.Eduard Burtescu-0/+4
2016-03-27rustc_trans: move save to librustc_save_analysis.Eduard Burtescu-1/+2
2016-03-25Compute a salt from arguments passed via -Cmetadata.Michael Woerister-2/+0
2016-03-22sprinkle feature gates here and thereJorge Aparicio-0/+1
2016-03-20Utilize `if..let` over single `match` branch.Corey Farwell-33/+28
2016-03-20Remove double-negative conditionals.Corey Farwell-6/+6
2016-03-20Replace unneeded owned `Vec` usage with `slice`.Corey Farwell-3/+3
2016-03-14Allow custom filenames for anonymous inputsmitaa-5/+6
2016-03-09Auto merge of #31631 - jonas-schievink:agoraphobia, r=nrcbors-6/+17
[breaking-batch] Move more uses of `panictry!` out of libsyntax
2016-03-03Hide gated cfg attributes from the output of `--print cfg`Andrea Canciani-1/+10
Gated cfg attributes are not available on the stable and beta release channels, therefore they should not be presented to users of those channels in order to avoid confusion.
2016-03-02Build the same configuration when compiling and for `--print cfg`Andrea Canciani-1/+3
The configuration returned by `config::build_configuration` needs to be modified with `target_features::add_configuration` in order to also contain the target features. This is already done for the configuration used when compiling and when creating the documentation, but was missing in the `cfg` printing code.
2016-02-24rustc: Refactor how unstable flags are handledAlex Crichton-52/+98
This commit adds support for *truly* unstable options in the compiler, as well as adding warnings for the start of the deprecation path of unstable-but-not-really options. Specifically, the following behavior is now in place for handling unstable options: * As before, an unconditional error is emitted if an unstable option is passed and the `-Z unstable-options` flag is not present. Note that passing another `-Z` flag does not require passing `-Z unstable-options` as well. * New flags added to the compiler will be in the `Unstable` category as opposed to the `UnstableButNotReally` category which means they will unconditionally emit an error when used on stable. * All current flags are in a category where they will emit warnings when used that the option will soon be a hard error. Also as before, it is intended that `-Z` is akin to `#![feature]` in a crate where it is required to unlock unstable functionality. A nightly compiler which is used without any `-Z` flags should only be exercising stable behavior.
2016-02-19Do less panicking in generalJonas Schievink-1/+13
2016-02-16Move more uses of `panictry!` out of libsyntaxJonas Schievink-6/+5
[breaking-change] for syntax extensions
2016-02-13Auto merge of #31358 - japaric:print-targets, r=alexcrichtonbors-0/+5
that prints a list of all the triples supported by the `--target` flag r? @alexcrichton
2016-02-13Auto merge of #31524 - jonas-schievink:autoderef, r=steveklabnikbors-1/+1
2016-02-12Use more autoderef in rustc_driverJonas Schievink-1/+1
2016-02-12Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brsonbors-1/+1
r? @brson cc @alexcrichton I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes. Will fix #27328.
2016-02-12rustc: add a `--print target-list` commandJorge Aparicio-0/+5
2016-02-11fixup: meta item kindOliver Schneider-1/+1
2016-02-11[breaking-change] don't glob export ast::MetaItem_Oliver 'ker' Schneider-5/+5
2016-02-11[breaking-change] don't pub export ast::Lit_ variantsOliver Schneider-1/+1
2016-02-10Auto merge of #31499 - kamalmarhubi:cfg-flag-invalid-cfgs, r=brsonbors-21/+60
A spec like `#[cfg(foo(bar))]` is not allowed as an attribute. This makes the same spec be rejected by the compiler if passed in as a `--cfg` argument. Fixes #31495
2016-02-08driver: Include invalid predicate in error messageKamal Marhubi-5/+20
2016-02-08rustc: Implement a new `--print cfg` flagAlex Crichton-0/+19
This commit is an implementation of the new compiler flags required by [RFC 1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to the compiler. This new directive will print the defined `#[cfg]` directives by the compiler for the target in question. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
2016-02-08driver: Disallow predicates in --cfg specsKamal Marhubi-1/+16
A spec like `#[cfg(foo(bar))]` is not allowed as an attribute. This makes the same spec be rejected by the compiler if passed in as a `--cfg` argument. Fixes #31495
2016-02-08driver: Extract handling of --explain to separate functionKamal Marhubi-20/+23
2016-02-08driver: Pass session options to CompilerCallbacks::early_callback()Kamal Marhubi-1/+7
2016-02-07Add compile-fail test in rustdocGuillaume Gomez-1/+1
2016-02-01Try to run compiler callbacks when we error outNick Cameron-6/+11
2016-02-01Replace some aborts with ResultsNick Cameron-13/+1
Fixes #31207 by removing abort_if_new_errors
2016-01-27Auto merge of #31206 - nrc:early-save, r=nikomatsakisbors-13/+60
r? @nikomatsakis
2016-01-26Initial work towards abort-free compilationNick Cameron-13/+60
The goal is that the compiler will pass `Result`s around rather than using abort_if_errors. To preserve behaviour we currently abort at the top level. I've removed all other aborts from the driver, but haven't touched any of the nested aborts.
2016-01-24mk: Move from `-D warnings` to `#![deny(warnings)]`Alex Crichton-0/+1
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-16Auto merge of #30930 - oli-obk:fix/30887, r=arielb1bors-0/+1
this makes sure the checks run before typeck (which might use the constant or const function to calculate an array length) and gives prettier error messages in case of for loops and such (since they aren't expanded yet). fixes #30887 r? @pnkfelix
2016-01-15move const block checks before lowering stepOliver Schneider-0/+1
this makes sure the checks run before typeck (which might use the constant or const function to calculate an array length) and gives prettier error messages in case of for loops and such (since they aren't expanded yet).
2016-01-15Address reviewer commentsNick Cameron-3/+3
[breaking-change] `OptLevel` variants are no longer `pub use`ed by rust::session::config. If you are using these variants, you must change your code to prefix the variant name with `OptLevel`.
2016-01-15Add an --output option for specifying an error emitterNick Cameron-11/+12
2016-01-11Replace --show-span with -Z show-spanMatt Kraai-5/+2
2016-01-06std::cmp::max -> maxMike Anderson-6/+6
2016-01-04Add mention of warnings lint group to help messageMike Anderson-0/+4
2015-12-21Register new snapshotsAlex Crichton-26/+4
Lots of cruft to remove!
2015-12-17move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*Nick Cameron-13/+12
Also split out emitters into their own module.