summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
AgeCommit message (Collapse)AuthorLines
2017-11-03Add support for specifying the TLS modelAmanieu d'Antras-0/+8
2017-10-20Add short message-formatGuillaume Gomez-2/+6
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-09-28Migrate to eprint/eprintln macros where appropriate.Corey Farwell-1/+1
2017-09-23Remove build_diagnostic_array hackbjorn3-2/+1
2017-09-23Merge rustc_trans_trait into rustc_trans_utilsbjorn3-5/+4
2017-09-23Move NoLlvmMetadataLoader to rustc_trans_traitsbjorn3-163/+3
2017-09-23Add TransCrate traitbjorn3-25/+115
2017-09-23[WIP] Less hacky way of supporting dylibsbjorn3-1/+4
2017-09-23Allow writing metadata without llvmbjorn3-2/+3
2017-09-17rustc: Move codegen to a queryAlex Crichton-0/+1
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.
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-6/+8
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-12Remove the `cstore` reference from Session in order to prepare encapsulating ↵Michael Woerister-8/+19
CrateStore access in tcx.
2017-09-09rustc: Remove `DepGraph` handling from rustc_metadataAlex Crichton-2/+2
This should now be entirely tracked through queries, so no need to have a `DepGraph` in the `CStore` object any more!
2017-09-04Auto merge of #43067 - pornel:libdeps, r=nrcbors-1/+6
Compact display of static lib dependencies Fixes #33173 Instead of displaying one dependency per line, I've changed the format to display them all in one line. As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.
2017-08-27Additional libc cleanupTatsuyuki Ishi-1/+2
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-23inc comp: -Z profile-queries support; see also ↵Matthew Hammer-0/+1
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md
2017-08-22--print=native-static-libsKornel-1/+6
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-4/+4
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-08-13Fix tidy errorsbjorn3-6/+14
2017-08-13Remove some more cfg'sbjorn3-60/+66
2017-08-12Less cfg'sbjorn3-8/+21
2017-08-11It now completely compiles without LLVM!!!bjorn3-11/+21
2017-08-11Actually make rustc_driver compile without llvmbjorn3-2/+23
2017-08-11Make librustc_driver work without librustc_transbjorn3-2/+47
2017-08-10Auto merge of #43582 - ivanbakel:unused_mut_ref, r=arielb1bors-1/+1
Fixed mutable vars being marked used when they weren't #### NB : bootstrapping is slow on my machine, even with `keep-stage` - fixes for occurances in the current codebase are <s>in the pipeline</s> done. This PR is being put up for review of the fix of the issue. Fixes #43526, Fixes #30280, Fixes #25049 ### Issue Whenever the compiler detected a mutable deref being used mutably, it marked an associated value as being used mutably as well. In the case of derefencing local variables which were mutable references, this incorrectly marked the reference itself being used mutably, instead of its contents - with the consequence of making the following code emit no warnings ``` fn do_thing<T>(mut arg : &mut T) { ... // don't touch arg - just deref it to access the T } ``` ### Fix Make dereferences not be counted as a mutable use, but only when they're on borrows on local variables. #### Why not on things other than local variables? * Whenever you capture a variable in a closure, it gets turned into a hidden reference - when you use it in the closure, it gets dereferenced. If the closure uses the variable mutably, that is actually a mutable use of the thing being dereffed to, so it has to be counted. * If you deref a mutable `Box` to access the contents mutably, you are using the `Box` mutably - so it has to be counted.
2017-08-10driver: factor out `continue_parse_after_error` so it can be controlled via ↵Nick Cameron-0/+1
driver API
2017-08-08driver: factor out a helper and make another helper publicNick Cameron-15/+20
2017-08-06de-orphan extended informationZack M. Davis-0/+4
Bizarrely, librustc_passes, librustc_plugin, librustc_mir, and libsyntax weren't getting their error explanations registered. Resolves #35284.
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-1/+1
2017-07-30librustc_driver: Remove -Z option from usage on stable compilerDaiki Mizukami-5/+9
2017-07-24Make keep_ast configurable by driver clientsNick Cameron-0/+2
2017-07-22Use config::pub_only rather than a spearate api modeNick Cameron-14/+2
2017-07-22Use a config file with save-analysisNick Cameron-0/+1
Replaces the output path env var. Can be passed to save-analysis via a function call or env var.
2017-07-06Auto merge of #42727 - alexcrichton:allocators-new, r=eddybbors-0/+1
rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-0/+1
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-03use single line commentsCengiz Can-7/+3
2017-07-03use embedded implementation instead of istty crateCengiz Can-3/+29
2017-07-03do not spawn pager if not ttyCengiz Can-1/+8
2017-07-03use unwrap_or_else to prevent unnecessary allocCengiz Can-3/+2
2017-07-03do not append an extra newline charCengiz Can-1/+1
2017-07-03use PAGER to view --explain output #32665Cengiz Can-3/+43
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-26/+23
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-1/+2
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-23Modify --explain to handle hidden code (`# ...`) and indented code blocks.kennytm-6/+13
2017-06-20Switch to the crates.io `getopts` crateAlex Crichton-10/+10
This commit deletes the in-tree `getopts` crate in favor of the crates.io-based `getopts` crate. The main difference here is with a new builder-style API, but otherwise everything else remains relatively standard.
2017-06-19Bump version and stage0 compilerAlex Crichton-5/+0