summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2018-12-01Rollup merge of #56339 - yui-knk:remove_mir_stats_flag, r=alexcrichtonkennytm-2/+0
Remove not used option `mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-4/+4
(compiler front-ends).
2018-11-29Remove not used optionyui-knk-2/+0
`mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-11-25Rollup merge of #56170 - wesleywiser:fix_self_profiler_windows, r=estebankPietro Albini-2/+4
Fix self profiler ICE on Windows Fixes #51648
2018-11-25Auto merge of #55959 - matthewjasper:remove-end-region, r=nikomatsakisbors-2/+0
Cleanup from lexical MIR borrowck removal Lexical MIR borrowck was removed months ago now, and `EndRegion`s are no longer used for MIRI verification. * Remove `rustc::mir::StatementKind::EndRegion` and the `-Zemit_end_regions` flag * Use `RegionVid` instead of `Region` in BorrowSet * Rewrite drop generation to create fewer goto terminators. r? @nikomatsakis
2018-11-23Auto merge of #54071 - eddyb:alignsssss, r=oli-obkbors-1/+1
rustc_target: separate out an individual alignment quantity type from Align. Before this PR, `rustc_target::abi::Align` combined "power-of-two alignment quantity" semantics, with a distinction between ABI (required) and preferred alignment (by having two quantities). After this PR, `Align` is only *one* such quantity, and a new `AbiAndPrefAlign` type is introduced to hold the pair of ABI and preferred `Align` quantities. `Align` is used everywhere one quantity is necessary/sufficient, simplifying some of the code in codegen/miri, while `AbiAndPrefAlign` only in layout computation (to propagate preferred alignment). r? @oli-obk cc @nagisa @RalfJung @nikomatsakis
2018-11-22Disable the self-profiler unless the `-Z self-profile` flag is setWesley Wiser-2/+4
Related to #51648
2018-11-22Rollup merge of #56078 - ehuss:fix-panic-opt-msg, r=alexcrichtonGuillaume Gomez-1/+1
Fix error message for `-C panic=xxx`. Fixes rust-lang/cargo#6334
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-3/+3
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-1/+1
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-2/+2
2018-11-21rustc: implement and use Default on more types.Eduard-Mihai Burtescu-1/+1
2018-11-19Fix error message for `-C panic=xxx`.Eric Huss-1/+1
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-2/+0
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-6/+6
fix various typos in doc comments
2018-11-13fix various typos in doc commentsAndy Russell-6/+6
2018-11-12Make `NodeId` a `newtype_index` to enable niche optimizationsOliver Scherer-2/+2
2018-11-11rustc: Clean up allocator injection logicAlex Crichton-2/+0
This commit cleans up allocator injection logic found in the compiler around selecting the global allocator. It turns out that now that jemalloc is gone the compiler never actually injects anything! This means that basically everything around loading crates here and there can be easily pruned. This also removes the `exe_allocation_crate` option from custom target specs as it's no longer used by the compiler anywhere.
2018-11-11Rollup merge of #55630 - petrochenkov:noprelude, r=Centrilkennytm-0/+4
resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` on 2018 edition This is a tiny thing. For historical reasons macro prelude (macros from `#[macro_use] extern crate ...`, including `extern crate std`) is still available in modules with `#[no_implicit_prelude]`. This PR provides proper isolation and removes those names from scope. `#[no_implicit_prelude]` modules still have built-in types (`u8`), built-in attributes (`#[inline]`) and built-in macros (`env!("PATH")`) in scope. We can introduce some `#[no_implicit_prelude_at_all]` to remove those as well, but that's a separate issue. The change is done only on 2018 edition for backward compatibility. I'm pretty sure this can be done on 2015 as well because `#[no_implicit_prelude]` is rarely used, but I don't want to go through the crater/deprecation process right now, maybe later. cc https://github.com/rust-lang/rust/issues/53977 r? @ghost
2018-11-08Rollup merge of #55576 - birkenfeld:opt-level-error-msg, r=cramertjMark Rousskov-1/+1
Clarify error message for -C opt-level The new levels s and z are not mentioned as possible values.
2018-11-07Rollup merge of #55692 - matthiaskrgr:remark_debuginfo_hint, r=michaelwoeristerkennytm-2/+1
-C remark: fix incorrect warning about requiring "--debuginfo" instead of "-C debuginfo=n" Previously suggested "--debuginfo" does not actually work.
2018-11-07Rollup merge of #55495 - wesleywiser:opt_fuel_rustbuild, r=nikomatsakiskennytm-1/+1
Don't print opt fuel messages to stdout because it breaks Rustbuild Rustbuild passes `--message-format json` to the compiler invocations which causes JSON to be emitted on stdout. Printing optimization fuel messages to stdout breaks the json and causes Rustbuild to fail. Work around this by emitting optimization fuel related messages on stderr instead.
2018-11-05-C remark: fix incorrect warning about requiring "--debuginfo" instead of ↵Matthias Krüger-2/+1
"-C debuginfo=n"
2018-11-03resolve: Filter away macro prelude in modules with `#[no_implicit_prelude]` ↵Vadim Petrochenkov-0/+4
on 2018 edition
2018-11-01Clarify error message for -C opt-levelGeorg Brandl-1/+1
The new levels s and z are not mentioned as possible values.
2018-10-29Don't print opt fuel messages to stdout because it breaks RustbuildWesley Wiser-1/+1
Rustbuild passes `--message-format json` to the compiler invocations which causes JSON to be emitted on stdout. Printing optimization fuel messages to stdout breaks the json and causes Rustbuild to fail. Work around this by emitting optimization fuel related messages on stderr instead.
2018-10-29Emit Retag statements, kill Validate statementsRalf Jung-3/+2
Also "rename" -Zmir-emit-validate to -Zmir-emit-retag, which is just a boolean (yes or no).
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-6/+4
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-3/+3
2018-10-18Rollup merge of #55031 - nikic:verify_llvm_ir, r=Mark-Simulacrumkennytm-0/+1
Improve verify_llvm_ir config option LLVM IR verification has been disabled by default in #51230. However, the implementation doesn't quite match what was discussed in the discussion. This patch implements two changes: * Make `verify_llvm_ir` influence the behavior of the compiled rustc binary, rather than just the rustc build system. That is, if `verify_llvm_ir=true`, even manual invocations of the built rustc will verify LLVM IR. * Enable verification of LLVM IR in CI, for non-deploy and deploy-alt builds. This is similar to how LLVM assertions are handled.
2018-10-17Auto merge of #54671 - petrochenkov:extpre2015, r=nikomatsakisbors-18/+0
resolve: Scale back hard-coded extern prelude additions on 2015 edition https://github.com/rust-lang/rust/pull/54404 stabilized `feature(extern_prelude)` on 2015 edition, including the hard-coded parts not passed with `--extern`. First of all, I'd want to confirm that this is intended stabilization, rather than a part of the "extended beta" scheme that's going to be reverted before releasing stable. (EDIT: to clarify - this is a question, I'm \*asking\* for confirmation, rather than give it.) Second, on 2015 edition extern prelude is not so fundamentally tied to imports and is a mere convenience, so this PR scales them back to the uncontroversial subset. The "uncontroversial subset" means that if libcore is injected it brings `core` into prelude, if libstd is injected it brings `std` and `core` into prelude. On 2015 edition this can be implemented through the library prelude (rather than hard-coding in the compiler) right now, I'll do it in a follow-up PR. UPDATE: The change is done for both 2015 and 2018 editions now as discussed below. Closes https://github.com/rust-lang/rust/issues/53166
2018-10-15rustc/session: move consts up to improve readabilityljedrz-9/+9
2018-10-15rustc/session: use to_owned when no string conversion is neededljedrz-2/+2
2018-10-15rustc/session: improve common patternsljedrz-58/+35
2018-10-15rustc/session: improve allocationsljedrz-5/+6
2018-10-15rustc/session: whitespace & formatting improvementsljedrz-85/+79
2018-10-13Revert "rustc_resolve: move extern_prelude from Resolver to Session."Vadim Petrochenkov-18/+0
This reverts commit e90985acdec9928da9f6d157cfeb64f0ee98bffe.
2018-10-13Improve verify_llvm_ir config optionNikita Popov-0/+1
* Make it influence the behavior of the compiled rustc, rather than just the rustc build system. That is, if verify_llvm_ir=true, even manual invocations of the built rustc will verify LLVM IR. * Enable verification of LLVM IR in CI, for non-deploy and deploy-alt builds. This is similar to how LLVM assertions are handled.
2018-10-11Support for disabling the PLT on ELF targetsGabriel Majeri-2/+26
Disable the PLT where possible to improve performance for indirect calls into shared libraries. This optimization is enabled by default where possible. - Add the `NonLazyBind` attribute to `rustllvm`: This attribute informs LLVM to skip PLT calls in codegen. - Disable PLT unconditionally: Apply the `NonLazyBind` attribute on every function. - Only enable no-plt when full relro is enabled: Ensures we only enable it when we have linker support. - Add `-Z plt` as a compiler option
2018-10-02Move prelude crate names into `Session`.David Wood-7/+6
Avoid hardcoding and special-casing the `std` crate name in the item path logic by moving the prelude crate name logic into the `Session` type so it can be reused in the item path logic and resolve module.
2018-10-01Rollup merge of #54676 - ↵kennytm-2/+0
pnkfelix:issue-15287-kill-zflag-disabling-ast-check, r=alexcrichton Remove `-Z disable_ast_check_for_mutation_in_guard` One should use `#![feature(bind_by_move_pattern_guards)]` over `-Z disable_ast_check_for_mutation_in_guard` cc #15287
2018-10-01Auto merge of #54675 - alexcrichton:defaultlibs, r=varkorbors-0/+2
rust: Add a `-C default-linker-libraries` option This commit adds a new codegen option for the compiler which disables rustc's passing of `-nodefaultlibs` by default on relevant platforms. Sometimes Rust is linked with C code which fails to link with `-nodefaultlibs` and is unnecessarily onerous to get linking correctly with `-nodefaultlibs`. An example of this is that when you compile C code with sanitizers and then pass `-fsanitize=address` to the linker, it's incompatible with `-nodefaultlibs` also being passed to the linker. In these situations it's easiest to turn off Rust's default passing of `-nodefaultlibs`, which was more ideological to start with than anything! Preserving the default is somewhat important but having this be opt-in shouldn't cause any breakage. Closes #54237
2018-09-30Auto merge of #54650 - eddyb:no-extern's-land, r=alexcrichtonbors-1/+18
Don't lint non-extern-prelude extern crate's in Rust 2018. Fixes #54381 by silencing the lint telling users to remove `extern crate` when `use` doesn't work. r? @alexcrichton cc @petrochenkov @nikomatsakis @Centril
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-7/+7
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-29rust: Add a `-C default-linker-libraries` optionAlex Crichton-0/+2
This commit adds a new codegen option for the compiler which disables rustc's passing of `-nodefaultlibs` by default on relevant platforms. Sometimes Rust is linked with C code which fails to link with `-nodefaultlibs` and is unnecessarily onerous to get linking correctly with `-nodefaultlibs`. An example of this is that when you compile C code with sanitizers and then pass `-fsanitize=address` to the linker, it's incompatible with `-nodefaultlibs` also being passed to the linker. In these situations it's easiest to turn off Rust's default passing of `-nodefaultlibs`, which was more ideological to start with than anything! Preserving the default is somewhat important but having this be opt-in shouldn't cause any breakage. Closes #54237
2018-09-28rustc_resolve: move extern_prelude from Resolver to Session.Eduard-Mihai Burtescu-1/+18
2018-09-28Prefer `#![feature(bind_by_move_pattern_guards)]` over `-Z ↵Felix S. Klock II-2/+0
disable_ast_check_for_mutation_in_guard`
2018-09-26add -Z emit-stack-sizesJorge Aparicio-0/+2
2018-09-25incr.comp.: Don't automatically enable -Zshare-generics for incr.comp. builds.Michael Woerister-1/+0
2018-09-23Auto merge of #54325 - michaelwoerister:incr-thinlto-tests, r=alexcrichtonbors-0/+11
incr.comp.: Allow for more fine-grained testing of CGU reuse and use it to test incremental ThinLTO. This adds some tests specifically targeted at incremental ThinLTO, plus the infrastructure for tracking the kind of cache hit/miss we had for a given CGU. @alexcrichton, let me know if you can think of any more tests to add. ThinLTO works rather reliably for small functions, so we should be able to test it in a robust way. I think after this lands it might time for a "Help us test incremental ThinLTO" post on irlo. r? @alexcrichton