about summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2018-01-18Change the --unpretty flag to -Z unprettyMark Mansi-6/+7
-Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI).
2018-01-15Add `-Z dep-info-omit-d-target` to control dep-info styleAdam C. Foltzer-2/+3
This avoids a breaking change to dep-info output, putting the gcc/clang-compliant dep-info behavior behind a flag
2018-01-15remove dep-info files as targets in themselvesAdam C. Foltzer-0/+2
2018-01-15Rollup merge of #47417 - petrochenkov:noasm, r=estebankkennytm-5/+1
Move "no asm" check into AST validation
2018-01-14Auto merge of #47223 - alexcrichton:new-target-feature, r=eddybbors-4/+4
rustc: Tweak `#[target_feature]` syntax This is an implementation of the `#[target_feature]` syntax-related changes of [RFC 2045][rfc]. Notably two changes have been implemented: * The new syntax is `#[target_feature(enable = "..")]` instead of `#[target_feature = "+.."]`. The `enable` key is necessary instead of the `+` to indicate that a feature is being enabled, and a sub-list is used for possible expansion in the future. Additionally within this syntax the feature names being enabled are now whitelisted against a known set of target feature names that we know about. * The `#[target_feature]` attribute can only be applied to unsafe functions. It was decided in the RFC that invoking an instruction possibly not defined for the current processor is undefined behavior, so to enable this feature for now it requires an `unsafe` intervention. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2045-target-feature.md
2018-01-13rustc: Refactor attribute checking to operate on HIRAlex Crichton-4/+4
This'll enable running queries that could be cached and overall be more amenable to the query infastructure.
2018-01-13Move "no asm" check into AST validationVadim Petrochenkov-5/+1
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-2/+1
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2018-01-13Rollup merge of #47331 - michaelwoerister:measure-depgraph-loading, ↵kennytm-4/+5
r=alexcrichton Add -Ztime-passes line for dep-graph loading. We measure how much time the background thread spends on loading the dep-graph but not how long the main thread is blocked while the background thread is still working. Let's change that!
2018-01-10Add -Ztime-passes line for dep-graph loading.Michael Woerister-4/+5
2018-01-09Replace uses of DepGraph.in_ignore with DepGraph.with_ignoreJohn Kåre Alsaker-15/+16
2018-01-09Rollup merge of #47233 - dotdash:cleanup_llvm, r=alexcrichtonkennytm-5/+0
Remove unused LLVM related code Ticks a few more boxes on #46437
2018-01-07Try to fix a perf regression by updating logMalo Jaffré-3/+3
Upgrade `log` to `0.4` in multiple crates.
2018-01-07Remove redundant -Zdebug-llvm optionBjörn Steinbrink-5/+0
The same effect can be achieved using -Cllvm-args=-debug Refs #46437 as it removes LLVMRustSetDebug()
2018-01-04rustc: Don't use relative paths for extended errorsAlex Crichton-0/+8
These no longer work now that Cargo changes the cwd of rustc while it's running. Instead use an absolute path that's set by rustbuild.
2017-12-28Prefer to use attr::contains_name() and attr::find_by_name()Seiichi Uchida-1/+1
2017-12-22Auto merge of #46779 - Zoxc:par-merge-without-sync, r=arielb1bors-38/+12
Work towards thread safety in rustc This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
2017-12-22Auto merge of #46732 - estebank:silence-recovered-blocks, r=petrochenkovbors-2/+4
Do not emit type errors on recovered blocks When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user. Fix #44579.
2017-12-21Do not emit type errors on recovered blocksEsteban Küber-2/+4
When a parse error occurs on a block, the parser will recover and create a block with the statements collected until that point. Now a flag stating that a recovery has been performed in this block is propagated so that the type checker knows that the type of the block (which will be identified as `()`) shouldn't be checked against the expectation to reduce the amount of irrelevant diagnostic errors shown to the user.
2017-12-22Rollup merge of #46814 - varkor:contrib-7, r=alexcrichtonkennytm-1/+17
Prevent rustc overwriting input files If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019. Kudos to @estebank, whose patch I finished off.
2017-12-21Remove useless RcJohn Kåre Alsaker-2/+2
2017-12-21Combine GlobalArenas and DroplessArena into AllArenasJohn Kåre Alsaker-36/+10
2017-12-19Move source-output conflict checking into `compile_input`varkor-14/+16
2017-12-18Prevent rustc overwriting input filesvarkor-1/+15
If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019.
2017-12-17Add sync module to rustc_data_structuresJohn Kåre Alsaker-1/+0
2017-12-16Auto merge of #46560 - Yoric:incr, r=michaelwoeristerbors-7/+15
Loading the dependency graph in the background Patch is a bit longer than I expected, due to the fact that most of this code relies upon a `Session` value, which is not `Sync`.
2017-12-15Resolves #46555 - Moving loading and decoding of dependency graph to ↵David Teller-7/+15
background thread
2017-12-15Rollup merge of #46705 - pornel:cargo-output, r=alexcrichtonSteve Klabnik-3/+2
Help Cargo tolerate RUSTFLAGS="--print=native-static-libs" Alternative to https://github.com/rust-lang/cargo/pull/4807 Having this "error" message was a mistake, as it's firing at exactly wrong time when Cargo is trying to read the output of other print commands.
2017-12-15Auto merge of #46537 - pnkfelix:two-phase-borrows, r=arielb1bors-4/+8
[MIR-borrowck] Two phase borrows This adds limited support for two-phase borrows as described in http://smallcultfollowing.com/babysteps/blog/2017/03/01/nested-method-calls-via-two-phase-borrowing/ The support is off by default; you opt into it via the flag `-Z two-phase-borrows` I have written "*limited* support" above because there are simple variants of the simple `v.push(v.len())` example that one would think should work but currently do not, such as the one documented in the test compile-fail/borrowck/two-phase-reservation-sharing-interference-2.rs (To be clear, that test is not describing something that is unsound. It is just providing an explicit example of a limitation in the implementation given in this PR. I have ideas on how to fix, but I want to land the work that is in this PR first, so that I can stop repeatedly rebasing this branch.)
2017-12-14trait alias falloutAlex Burka-0/+1
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-24/+21
2017-12-13Expanded HIR `--unpretty hir,identified` to include HIR local id.Felix S. Klock II-4/+8
Having the HIR local id is useful for cases like understanding the ReScope identifiers, which are now derived from the HIR local id, and thus one can map an ReScope back to the HIR node, once one knows what those local ids are.
2017-12-13Remove message that prevents Cargo from working with --print=native-static-libsKornel-3/+2
2017-12-11move `resolve_lifetimes` into a proper queryNiko Matsakis-9/+2
Now that we made `resolve_lifetimes` into a query, elision errors no longer abort compilation, which affects some tests. Also, remove `dep_graph_crosscontaminate_tables` -- there is no a path in the dep-graph, though red-green handles it. The same scenario is (correctly) tested by issue-42602.rs in any case.
2017-12-07mir-borrowck returns closure requirements, mir-typeck enforcesNiko Matsakis-1/+1
2017-12-06Rollup merge of #46136 - tbu-:pr_werror, r=nikomatsakisCorey Farwell-1/+1
Clarify what `-D warnings` or `-F warnings` does They set all lints currently on the warning level to `deny` or `forbid`, respectively.
2017-12-04make `resolve_regions_and_report_errors` take an `OutlivesEnv`Niko Matsakis-4/+5
This revealed some shortcomings, one of which is fixed. Fixes #45937.
2017-12-01Changed the wording for the `warnings` lintTobias Bucher-1/+1
2017-11-25rustbuild: Enable WebAssembly backend by defaultAlex Crichton-15/+28
This commit alters how we compile LLVM by default enabling the WebAssembly backend. This then also adds the wasm32-unknown-unknown target to get compiled on the `cross` builder and distributed through rustup. Tests are not yet enabled for this target but that should hopefully be coming soon!
2017-11-23Auto merge of #45721 - nikomatsakis:hir-tree, r=arielb1bors-0/+42
add -Zunpretty=hir-tree This uses the debug impls to dump the raw HIR. Particularly useful when learning how the compiler works. cc @qmx
2017-11-20Clarify what `-D warnings` or `-F warnings` doesTobias Bucher-1/+1
They set all lints currently on the warning level to `deny` or `forbid`, respectively.
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-02add -Zunpretty=hir-treeNiko Matsakis-0/+42
This uses the debug impls to dump the raw HIR. Particularly useful when learning how the compiler works.