about summary refs log tree commit diff
path: root/src/librustc/driver/session.rs
AgeCommit message (Collapse)AuthorLines
2014-11-18Move trans, back, driver, and back into a new crate, rustc_trans. Reduces ↵Niko Matsakis-265/+0
memory usage significantly and opens opportunities for more parallel compilation.
2014-11-06Fallout from collection conventionsAlexis Beingessner-1/+1
2014-11-04Implement flexible target specificationCorey Richardson-3/+3
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-11-01Remove unnecessary allocationsJorge Aparicio-1/+1
2014-10-17auto merge of #16855 : P1start/rust/help-messages, r=brsonbors-0/+6
This adds ‘help’ diagnostic messages to rustc. This is used for anything that provides help to the user, particularly the `--explain` messages that were previously integrated into the relevant error message. They look like this: ``` match.rs:10:13: 10:14 error: unreachable pattern [E0001] match.rs:10 1 => {}, ^ match.rs:3:1: 3:38 note: in expansion of foo! match.rs:7:5: 20:2 note: expansion site match.rs:10:13: 10:14 help: pass `--explain E0001` to see a detailed explanation ``` (`help` is coloured cyan.) Adding these errors on a separate line stops the lines from being too long, as discussed in #16619.
2014-09-21Move -Z lto to -C lto.Colin Davidson-1/+1
Closes #12443
2014-09-17move feature_gate to libsyntaxNick Cameron-3/+3
2014-09-17move most of front to libsyntaxNick Cameron-11/+2
2014-09-14Add help diagnostic messagesP1start-0/+6
This adds ‘help’ diagnostic messages to rustc. This is used for anything that provides help to the user, particularly the `--explain` messages that were previously integrated into the relevant error message.
2014-09-14rustc: fix fallout from using ptr::P.Eduard Burtescu-2/+1
2014-07-12Convert a first batch of diagnostics to have error codesJakub Wieczorek-0/+3
2014-07-12auto merge of #15601 : jbclements/rust/disable-default-macro-behavior, ↵bors-1/+2
r=alexcrichton Our AST definition can include macro invocations, which can expand into all kinds of things. Macro invocations are expanded away during expansion time, and the rest of the compiler doesn't have to deal with them. However, we have no way of enforcing this. This patch adds two protective mechanisms. First, it adds a (quick) explicit check that ensures there are no macro invocations remaining in the AST after expansion. Second, it updates the visit and fold mechanisms so that by default, they will not traverse macro invocations. It's easy enough to add this, if desired (it's documented in the source, and examples appear, e.g. in the IdentFinder. Along the way, I also consulted with @sfackler to refactor the macro export mechanism so that it stores macro text spans in a side table, rather than leaving them in the AST.
2014-07-11use side table to store exported macrosJohn Clements-1/+2
Per discussion with @sfackler, refactored the expander to change the way that exported macros are collected. Specifically, a crate now contains a side table of spans that exported macros go into. This has two benefits. First, the encoder doesn't need to scan through the expanded crate in order to discover exported macros. Second, the expander can drop all expanded macros from the crate, with the pleasant result that a fully expanded crate contains no macro invocations (which include macro definitions).
2014-07-11Add scaffolding for assigning alpha-numeric codes to rustc diagnosticsJakub Wieczorek-2/+7
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-06-24Store the registered lints in the SessionKeegan McAllister-2/+7
2014-06-24Replace enum LintId with an extensible alternativeKeegan McAllister-3/+4
2014-06-24Rename lint::Lint to lint::LintIdKeegan McAllister-2/+2
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-16auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichtonbors-1/+0
2014-06-13Dump results of analysis phase as CSVNick Cameron-0/+1
Adds the option -Zsave-analysis which will dump the results of syntax and type checking into CSV files. These can be interpreted by tools such as DXR to provide semantic information about Rust programs for code search, cross-reference, etc. Authored by Nick Cameron and Peter Elmers (@pelmers; including enums, type parameters/generics).
2014-06-12Basic iOS supportValerii Hiora-1/+0
2014-06-09Implement #[plugin_registrar]Keegan McAllister-2/+2
See RFC 22. [breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-3/+3
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-1/+2
2014-05-15Add compiler flag to configure output coloringHanno Braun-1/+1
This adds the flag --color, which allows the user to force coloring or turn it off. The default behavior stays the same as before (colorize, if output goes to tty). Why this is beneficial is explained in issue #12881. Please note that this commit doesn't include any regression tests. I thought about how I'd write a test for this and it doesn't seem to be worth the effort to me for a UI change like this. Fixes #12881.
2014-05-12librustc: Remove all uses of `~str` from librustc.Patrick Walton-8/+5
2014-05-11Reorganise driver code.Nick Cameron-366/+73
The goal of this refactoring is to make the rustc driver code easier to understand and use. Since this is as close to an API as we have, I think it is important that it is nice. On getting stuck in, I found that there wasn't as much to change as I'd hoped to make the stage... fns easier to use by tools. This patch only moves code around - mostly just moving code to different files, but a few extracted method refactorings too. To summarise the changes: I added driver::config which handles everything about configuring the compiler. driver::session now just defines and builds session objects. I moved driver code from librustc/lib.rs to librustc/driver/mod.rs so all the code is one place. I extracted methods to make emulating the compiler without being the compiler a little easier. Within the driver directory, I moved code around to more logically fit in the modules.
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-1/+2
2014-05-06auto merge of #13892 : alexcrichton/rust/mixing-rlib-dylib-deps, r=brsonbors-2/+2
Currently, rustc requires that a linkage be a product of 100% rlibs or 100% dylibs. This is to satisfy the requirement that each object appear at most once in the final output products. This is a bit limiting, and the upcoming libcore library cannot exist as a dylib, so these rules must change. The goal of this commit is to enable *some* use cases for mixing rlibs and dylibs, primarily libcore's use case. It is not targeted at allowing an exhaustive number of linkage flavors. There is a new dependency_format module in rustc which calculates what format each upstream library should be linked as in each output type of the current unit of compilation. The module itself contains many gory details about what's going on here. cc #10729
2014-05-02rustc: Remove the session building_library flagAlex Crichton-22/+0
This has long since not been too relevant since the introduction of many crate type outputs. This commit removes the flag entirely, adjusting all logic to do the most reasonable thing when building both a library and an executable. Closes #13337
2014-05-02rustc: Add some suppot for mixing rlibs and dylibsAlex Crichton-2/+2
Currently, rustc requires that a linkage be a product of 100% rlibs or 100% dylibs. This is to satisfy the requirement that each object appear at most once in the final output products. This is a bit limiting, and the upcoming libcore library cannot exist as a dylib, so these rules must change. The goal of this commit is to enable *some* use cases for mixing rlibs and dylibs, primarily libcore's use case. It is not targeted at allowing an exhaustive number of linkage flavors. There is a new dependency_format module in rustc which calculates what format each upstream library should be linked as in each output type of the current unit of compilation. The module itself contains many gory details about what's going on here. cc #10729
2014-04-23Enable use of syntax extensions when cross compiling.Douglas Young-6/+14
This adds the target triple to the crate metadata. When searching for a crate the phase (link, syntax) is taken into account. During link phase only crates matching the target triple are considered. During syntax phase, either the target or host triple will be accepted, unless the crate defines a macro_registrar, in which case only the host triple will match.
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-5/+5
2014-04-17auto merge of #13557 : FlaPer87/rust/ls-behind-z, r=brsonbors-2/+4
Closes #13549
2014-04-16Move `--ls` behind `-Z ls`Flavio Percoco-2/+4
Closes #13549
2014-04-15auto merge of #13489 : JustAPerson/rust/crate-file-name, r=alexcrichtonbors-33/+41
Before, the `--crate-file-name` flag only checked crate attributes for possible crate types. Now, if any type is specified by one or more `--crate-type` flags, only the filenames for those types will be emitted, and any types specified by crate attributes will be ignored.
2014-04-14Only check --crate-type flags if present.JustAPerson-33/+41
Before, normal compilation and the --crate-file-name flag would generate output based on both #![crate_type] attributes and --crate-type flags. Now, if one or more flag is specified by command line, only those will be used. Closes #11573.
2014-04-13rustc: Don't link in syntax extensionsAlex Crichton-1/+1
This bug was introduced in #13384 by accident, and this commit continues the work of #13384 by finishing support for loading a syntax extension crate without registering it with the local cstore. Closes #13495
2014-04-06auto merge of #13340 : FlaPer87/rust/code-model, r=cmrbors-0/+2
Rust currently defaults to `RelocPIC` regardless. This patch adds a new codegen option that allows choosing different relocation-model. The available models are: - default (Use the target-specific default model) - static - pic - no-pic For a more detailed information use `llc --help`
2014-04-06Add support for different relocation modelsFlavio Percoco-0/+2
Rust currently defaults to `RelocPIC` regardless. This patch adds a new codegen option that allows choosing different relocation-model. The available models are: - default (Use the target-specific default model) - static - pic - no-pic For a more detailed information use `llc --help`
2014-04-05Added session.fileline_note() method and support infrastucture for it.Felix S. Klock II-0/+3
Add way to print notes with just file:linenum prefix (preserving integration with source lookup for e.g. vi and emacs) but don't repeat the other span info.
2014-03-31rustc: Switch field privacy as necessaryAlex Crichton-40/+40
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-2/+0
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-25Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by ↵Marvin Löbel-2/+2
value
2014-03-24rustc: Remove all crate map supportAlex Crichton-2/+0
The crate map is no longer necessary now that logging and event loop factories have been moved out. Closes #11617 Closes #11731
2014-03-22rustc: Fix fallout of removing get()Alex Crichton-2/+2
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-2/+1
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-2/+2
Closes #12771
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-28/+29