summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2017-11-17strip old lub-glb tests from `librustc_driver`Niko Matsakis-212/+0
Good riddance.
2017-11-15Auto merge of #45944 - eddyb:provide, r=nikomatsakisbors-26/+47
rustc_driver: expose a way to override query providers in CompileController. This API has been a long-time coming and will probably become the main method for custom drivers (that is, binaries other than `rustc` itself that use `librustc_driver`) to adapt the compiler's behavior.
2017-11-14rustc: move the MIR pass infrastructure and list to rustc_mir.Eduard-Mihai Burtescu-54/+0
2017-11-12rustc_driver: expose a way to override query providers in CompileController.Eduard-Mihai Burtescu-20/+45
2017-11-12rustc_driver: base extern query providers on local ones.Eduard-Mihai Burtescu-8/+4
2017-11-07Auto merge of #45666 - Amanieu:tls-model, r=alexcrichtonbors-0/+8
Allow overriding the TLS model This PR adds the ability to override the default "global-dynamic" TLS model with a more specific one through a target json option or a command-line option. This allows for better code generation in certain situations. This is similar to the `-ftls-model=` option in GCC and Clang.
2017-11-03[Syntax Breaking] Rename DefaultImpl to AutoImplleonardo.yvens-1/+1
DefaultImpl is a highly confusing name for what we now call auto impls, as in `impl Send for ..`. The name auto impl is not formally decided but for sanity anything is better than `DefaultImpl` which refers neither to `default impl` nor to `impl Default`.
2017-11-03Add support for specifying the TLS modelAmanieu d'Antras-0/+8
2017-11-01Auto merge of #45538 - nikomatsakis:nll-liveness, r=pnkfelixbors-1/+0
enable non-lexical lifetimes in the MIR borrow checker This PR, joint work with @spastorino, fills out the NLL infrastructure and integrates it with the borrow checker. **Don't get too excited:** it includes still a number of hacks (the subtyping code is particularly hacky). However, it *does* kinda' work. =) The final commit demonstrates this by including a test that -- with both the AST borrowck and MIR borrowck -- reports an error by default. But if you pass `-Znll`, you only get an error from the AST borrowck, demonstrating that the integration succeeds: ``` struct MyStruct { field: String } fn main() { let mut my_struct = MyStruct { field: format!("Hello") }; let value = &my_struct.field; if value.is_empty() { my_struct.field.push_str("Hello, world!"); //~^ ERROR cannot borrow (Ast) } } ```
2017-11-01Auto merge of #45472 - michaelwoerister:incr-comp-caching-base, r=nikomatsakisbors-0/+7
incr.comp.: Implement compiler diagnostic persistence. This PR implements storing and loading diagnostics that the compiler generates and thus allows for emitting warnings during incremental compilation without actually re-evaluating the thing the warning originally came from. It also lays some groundwork for storing and loading type information and MIR in the incr. comp. cache. ~~It is still work in progress:~~ - ~~There's still some documentation to be added.~~ - ~~The way anonymous queries are handled might lead to duplicated emissions of warnings. Not sure if there is a better way or how frequent such duplication would be in practice.~~ Diagnostic message duplication is addressed separately in #45519. r? @nikomatsakis
2017-10-31remove the NLL pass (it is now invoked by mir borrowck)Niko Matsakis-1/+0
2017-10-25Auto merge of #44636 - GuillaumeGomez:little-error-msg, r=michaelwoeristerbors-2/+6
Add short error message-format Fixes #42653.
2017-10-25Fix librustc_driver unit test after API change.Michael Woerister-0/+2
2017-10-25incr.comp.: Implement query diagnostic persistence.Michael Woerister-0/+5
2017-10-24Introduce CrateDisambiguator newtype and fix testsIgor Matuszewski-4/+4
2017-10-23Use 128 bit instead of Symbol for crate disambiguatorIgor Matuszewski-10/+8
2017-10-20Add short message-formatGuillaume Gomez-2/+6
2017-10-16convert constant promotion into a queryNiko Matsakis-1/+2
2017-10-10Fixed client code for diagnostics migration, adding new methods to `trait ↵Felix S. Klock II-1/+0
BorrowckErrors` as necessary.
2017-10-10Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundibors-1/+1
Migrate to eprint/eprintln macros where appropriate. None
2017-10-07Auto merge of #44860 - kennytm:fix-44731, r=alexcrichtonbors-1/+17
Fix issue #44731. Also excludes `impl Trait` from everybody_loops if it appears in the path. Fixes #44731.
2017-10-02incr.comp.: Remove saving and loading of legacy dep-graph.Michael Woerister-5/+5
2017-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-1/+1
2017-09-26Fix issue #44731.kennytm-1/+17
Also excludes `impl Trait` from everybody_loops if it appears in the path.
2017-09-25Auto merge of #44085 - bjorn3:no_llvm_write_metadata, r=arielb1bors-150/+64
Allow writing metadata without llvm # Todo: * [x] Rebase * [x] Fix eventual errors * [x] <strike>Find some crate to write elf files</strike> (will do it later) Cc #43842
2017-09-25Auto merge of #44646 - petrochenkov:scompress, r=michaelwoeristerbors-2/+2
Compress most of spans to 32 bits As described in https://internals.rust-lang.org/t/rfc-compiler-refactoring-spans/1357/28 Closes https://github.com/rust-lang/rust/issues/15594 r? @michaelwoerister
2017-09-24address review commentsAriel Ben-Yehuda-4/+0
2017-09-24move unsafety checking to MIRAriel Ben-Yehuda-4/+5
No functional changes intended.
2017-09-24add lint levels to VisibilityScopeAriel Ben-Yehuda-3/+4
2017-09-23incr.comp.: Serialize and deserialize new DepGraphMichael Woerister-2/+10
2017-09-23incr.comp.: Do some various cleanup.Michael Woerister-7/+0
2017-09-23Fix errorbjorn3-1/+2
2017-09-23Remove now unused dependency on flate2 from rustc_driverbjorn3-1/+0
2017-09-23Fix tidy errorsbjorn3-1/+2
2017-09-23Remove build_diagnostic_array hackbjorn3-2/+1
2017-09-23Fix some nitsbjorn3-19/+13
2017-09-23Merge rustc_trans_trait into rustc_trans_utilsbjorn3-7/+5
2017-09-23Move NoLlvmMetadataLoader to rustc_trans_traitsbjorn3-204/+25
2017-09-23Add TransCrate traitbjorn3-50/+136
2017-09-23[WIP] Less hacky way of supporting dylibsbjorn3-20/+14
2017-09-23Dont do no-trans for llvm enabled buildsbjorn3-1/+1
2017-09-23Allow building stage 2 compiler librariesbjorn3-9/+28
2017-09-23Allow writing metadata without llvmbjorn3-3/+5
2017-09-23Compress "small" spans to 32 bits and intern "large" spansVadim Petrochenkov-2/+2
2017-09-20incr.comp.: Add some comments.Michael Woerister-1/+1
2017-09-20incr.comp.: Remove IncrementalHashesMap and calculate_svh module.Michael Woerister-20/+10
2017-09-20incr.comp.: Store result fingerprints in DepGraph.Michael Woerister-1/+1
2017-09-19rework the README.md for rustc and add other readmesNiko Matsakis-0/+12
This takes way longer than I thought it would. =)
2017-09-18incr.comp.: Remove tcx from StableHashingContext.Michael Woerister-2/+2
2017-09-17rustc: Move codegen to a queryAlex Crichton-13/+41
This commit moves the actual code generation in the compiler behind a query keyed by a codegen unit's name. This ended up entailing quite a few internal refactorings to enable this, along with a few cut corners: * The `OutputFilenames` structure is now tracked in the `TyCtxt` as it affects a whole bunch of trans and such. This is now behind a query and threaded into the construction of the `TyCtxt`. * The `TyCtxt` now has a channel "out the back" intended to send data to worker threads in rustc_trans. This is used as a sort of side effect of the codegen query but morally what's happening here is the return value of the query (currently unit but morally a path) is only valid once the background threads have all finished. * Dispatching work items to the codegen threads was refactored to only rely on data in `TyCtxt`, which mostly just involved refactoring where data was stored, moving it from the translation thread to the controller thread's `CodegenContext` or the like. * A new thread locals was introduced in trans to work around the query system. This is used in the implementation of `assert_module_sources` which looks like an artifact of the old query system and will presumably go away once red/green is up and running.