about summary refs log tree commit diff
path: root/src/librustc/driver/mod.rs
AgeCommit message (Collapse)AuthorLines
2014-11-18Move trans, back, driver, and back into a new crate, rustc_trans. Reduces ↵Niko Matsakis-510/+0
memory usage significantly and opens opportunities for more parallel compilation.
2014-11-17Fix fallout from coercion removalNick Cameron-1/+1
2014-11-15Slightly improved rustc error messages for invalid -C argumentsinrustwetrust-8/+4
2014-11-12Register new snapshotsAlex Crichton-28/+0
2014-11-05Fix fallout of DSTifying PartialEq, PartialOrd, Eq, OrdJorge Aparicio-0/+28
2014-11-04Implement flexible target specificationCorey Richardson-1/+1
Removes all target-specific knowledge from rustc. Some targets have changed during this, but none of these should be very visible outside of cross-compilation. The changes make our targets more consistent. iX86-unknown-linux-gnu is now only available as i686-unknown-linux-gnu. We used to accept any value of X greater than 1. i686 was released in 1995, and should encompass the bare minimum of what Rust supports on x86 CPUs. The only two windows targets are now i686-pc-windows-gnu and x86_64-pc-windows-gnu. The iOS target has been renamed from arm-apple-ios to arm-apple-darwin. A complete list of the targets we accept now: arm-apple-darwin arm-linux-androideabi arm-unknown-linux-gnueabi arm-unknown-linux-gnueabihf i686-apple-darwin i686-pc-windows-gnu i686-unknown-freebsd i686-unknown-linux-gnu mips-unknown-linux-gnu mipsel-unknown-linux-gnu x86_64-apple-darwin x86_64-unknown-freebsd x86_64-unknown-linux-gnu x86_64-pc-windows-gnu Closes #16093 [breaking-change]
2014-10-30Fix a minor issue with how lint groups are printed by rustcP1start-1/+2
2014-10-29Rename fail! to panic!Steve Klabnik-7/+7
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-5/+9
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-02rollup merge of #17682 : nodakai/librustc-handy-versionAlex Crichton-4/+20
2014-10-02librustc/driver: expose build information of rustc.NODA, Kai-4/+20
CFG_RELEASE, CFG_VER_HASH and CFG_VER_DATE were only available as an output to stdout from the driver::version() function that had an inconvenient signature.
2014-09-30Remove unnecessary allocation, update API name for starting the rustc driver.Benjamin Adamson-5/+2
2014-09-16Fallout from renamingAaron Turon-6/+6
2014-08-30auto merge of #16419 : huonw/rust/pretty-expanded-hygiene, r=pnkfelixbors-39/+3
Different Identifiers and Names can have identical textual representations, but different internal representations, due to the macro hygiene machinery (syntax contexts and gensyms). This provides a way to see these internals by compiling with `--pretty expanded,hygiene`. This is useful for debugging & hacking on macros (e.g. diagnosing https://github.com/rust-lang/rust/issues/15750/https://github.com/rust-lang/rust/issues/15962 likely would've been faster with this functionality). E.g. ```rust #![feature(macro_rules)] // minimal junk #![no_std] macro_rules! foo { ($x: ident) => { y + $x } } fn bar() { foo!(x) } ``` ```rust #![feature(macro_rules)] // minimal junk #![no_std] fn bar /* 61#0 */() { y /* 60#2 */ + x /* 58#3 */ } ```
2014-08-30Add lint groups; define built-in lint groups `bad_style` and `unused`P1start-12/+56
This adds support for lint groups to the compiler. Lint groups are a way of grouping a number of lints together under one name. For example, this also defines a default lint for naming conventions, named `bad_style`. Writing `#[allow(bad_style)]` is equivalent to writing `#[allow(non_camel_case_types, non_snake_case, non_uppercase_statics)]`. These lint groups can also be defined as a compiler plugin using the new `Registry::register_lint_group` method. This also adds two built-in lint groups, `bad_style` and `unused`. The contents of these groups can be seen by running `rustc -W help`.
2014-08-29rustc: move pretty printing into its own module.Huon Wilson-39/+3
There's a lot of it, and it's a fairly well-defined/separate chunk of code, so it might as well be separate.
2014-08-13core: Change the argument order on splitn and rsplitn for strs.Brian Anderson-1/+1
This makes it consistent with the same functions for slices, and allows the search closure to be specified last. [breaking-change]
2014-08-09pretty-printer: let users choose particular items to pretty print.Felix S. Klock II-23/+22
With this change: * `--pretty variant=<node-id>` will print the item associated with `<node-id>` (where `<node-id>` is an integer for some node-id in the AST, and `variant` means one of {`normal`,`expanded`,...}). * `--pretty variant=<path-suffix>` will print all of the items that match the `<path-suffix>` (where `<path-suffix>` is a suffix of a path, and `variant` again means one of {`normal`,`expanded`,...}). Example 1: the suffix `typeck::check::check_struct` matches the item with the path `rustc::middle::typeck::check::check_struct` when compiling the `rustc` crate. Example 2: the suffix `and` matches `core::option::Option::and` and `core::result::Result::and` when compiling the `core` crate. Both of the `--pretty variant=...` modes will include the full path to the item in a comment that follows the item. Note that when multiple paths match, then either: 1. all matching items are printed, in series; this is what happens in the usual pretty-print variants, or 2. the compiler signals an error; this is what happens in flowgraph printing. ---- Some drive-by improvements: Heavily refactored the pretty-printing glue in driver.rs, introducing a couple local traits to avoid cut-and-pasting very code segments that differed only in how they accessed the `Session` or the `ast_map::Map`. (Note the previous code had three similar calls to `print_crate` which have all been unified in this revision; the addition of printing individual node-ids exacerbated the situation beyond tolerance.) We may want to consider promoting some of these traits, e.g. `SessionCarrier`, for use more generally elsewhere in the compiler; right now I have to double check how to access the `Session` depending on what context I am hacking in. Refactored `PpMode` to make the data directly reflect the fundamental difference in the categories (in terms of printing source-code with various annotations, versus printing a control-flow graph). (also, addressed review feedback.)
2014-07-21rustc: Pass optional additional plugins to compile_inputBrian Anderson-1/+1
This provides a way for clients of the rustc library to add their own features to the pipeline.
2014-07-21rustc: Make `monitor` public.Brian Anderson-1/+1
It's harder to run rustc correctly without it.
2014-07-17Rename functions in the CloneableVector traitAdolfo Ochagavía-1/+1
* Deprecated `to_owned` in favor of `to_vec` * Deprecated `into_owned` in favor of `into_vec` [breaking-change]
2014-07-15Fix errorsAdolfo Ochagavía-1/+0
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-2/+1
Use `String::from_utf8` instead [breaking-change]
2014-07-14rustc_llvm: Remove the inner llvm moduleBrian Anderson-1/+1
This makes it much saner for clients to use the library since they don't have to worry about shadowing one llvm with another.
2014-07-11Add scaffolding for assigning alpha-numeric codes to rustc diagnosticsJakub Wieczorek-8/+27
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-2/+2
[breaking-change]
2014-07-05rustc: Default #[crate_name] on input, not outputAlex Crichton-2/+1
2014-07-05rustc: Repurpose the --crate-name CLI flagAlex Crichton-0/+5
In a cargo-driven world the primary location for the name of a crate will be in its manifest, not in the source file itself. The purpose of this flag is to reduce required duplication for new cargo projects. This is a breaking change because the existing --crate-name flag actually printed the crate name. This flag was renamed to --print-crate-name, and to maintain consistence, the --crate-file-name flag was renamed to --print-file-name. To maintain backwards compatibility, the --crate-file-name flag is still recognized, but it is deprecated. [breaking-change]
2014-07-05rustc: Add a new codegen flag, -C metadata=fooAlex Crichton-0/+2
This metadata is used to drive the hash of all symbols in a crate. The flag can be specified a multiple number of times RFC: 0035-remove-crate-id
2014-07-05rustc: Remove CrateId and all related supportAlex Crichton-9/+6
This commit removes all support in the compiler for the #[crate_id] attribute and all of its derivative infrastructure. A list of the functionality removed is: * The #[crate_id] attribute no longer exists * There is no longer the concept of a version of a crate * Version numbers are no longer appended to symbol names * The --crate-id command line option has been removed To migrate forward, rename #[crate_id] to #[crate_name] and only the name of the crate itself should be mentioned. The version/path of the old crate id should be removed. For a transitionary state, the #[crate_id] attribute is still accepted if the #[crate_name] is not present, but it is warned about if it is the only identifier present. RFC: 0035-remove-crate-id [breaking-change]
2014-06-24Stabilize version output for rustc and rustdocRobert Buonpastore-9/+22
2014-06-24Implement lint pluginsKeegan McAllister-6/+17
2014-06-24Reindent function call continuations, and other style fixesKeegan McAllister-1/+1
2014-06-24Use names in Lint structs in an ASCII-case-insensitive wayKeegan McAllister-1/+2
In preparation for the next commit.
2014-06-24Store the registered lints in the SessionKeegan McAllister-26/+43
2014-06-24Replace enum LintId with an extensible alternativeKeegan McAllister-30/+31
2014-06-24Move lint.rs out of middleKeegan McAllister-1/+1
We're going to have more modules under lint, and the paths get unwieldy. We also plan to have lints run at multiple points in the compilation pipeline.
2014-06-18Fallout from TaskBuilder changesAaron Turon-10/+7
This commit brings code downstream of libstd up to date with the new TaskBuilder API.
2014-06-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-2/+1
2014-06-14getopts: format failure messages with `Show`.Huon Wilson-1/+1
This obsoletes the old `to_err_msg` method. Replace println!("Error: {}", failure.to_err_msg()) let string = failure.to_err_msg(); with println!("Error: {}", failure) let string = failure.to_str(); [breaking-change]
2014-06-12Better dylib skipping based on Alex Crichton codeValerii Hiora-2/+1
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-1/+1
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-05-27std: Rename strbuf operations to stringRicho Healey-5/+5
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-2/+2
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-4/+4
[breaking-change]
2014-05-22auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonwbors-1/+1
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-5/+6
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-8/+15
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.