about summary refs log tree commit diff
path: root/src/librustc/session
AgeCommit message (Collapse)AuthorLines
2018-04-23make rustdoc test follow the jobserver limit of threadsfix that to many ↵Andreas Jonson-4/+13
threads is executing at the same timewhen rustdoc test is executed.
2018-04-20fix some small compile errorsKurtis Nusbaum-1/+2
2018-04-19add EDITIONS_NAME_LIST, make edition tracked, enforce that only stable ↵Kurtis Nusbaum-9/+18
editions are allowed to be used on non-nightly builds
2018-04-19add --edition optionKurtis Nusbaum-26/+49
2018-04-18Work around rust-lang/rust#49998 with experimental code that does less ↵Felix S. Klock II-0/+2
updating of cause map. This seems to avoid poor scaling on src/test/ui/span/dropck_vec_cycle_checked.rs
2018-04-18Auto merge of #49349 - Zoxc:sync-errors, r=michaelwoeristerbors-7/+7
Make Handler more thread-safe The use of `code_emitted` to suppress extended explanations is not thread safe. I'm not sure why we keep the documentation for errors outside `diagnostics.rs` anyway. It would be better to add a `teach` method to `DiagnosticsBuilder`, so instead of: ``` if self.tcx.sess.teach(&err.get_code().unwrap()) { err.note("..."); } ``` we'd use `err.teach("...")` cc @estebank r? @michaelwoerister
2018-04-17Make one_time_diagnostics thread-safeJohn Kåre Alsaker-2/+2
2018-04-17Make Handler more thread-safeJohn Kåre Alsaker-5/+5
2018-04-17Auto merge of #49836 - nikomatsakis:nll-facts-prep, r=pnkfelixbors-2/+0
prep work for using timely dataflow with NLL Two major changes: **Two-phase borrows are overhauled.** We no longer have two bits per borrow. Instead, we track -- for each borrow -- an (optional) "activation point". Then, for each point P where the borrow is in scope, we check where P falls relative to the activation point. If P is between the reservation point and the activation point, then this is the "reservation" phase of the borrow, else the borrow is considered active. This is simpler and means that the dataflow doesn't have to care about 2-phase at all, at last not yet. **We no longer support using the MIR borrow checker without NLL.** It is going to be increasingly untenable to support lexical mode as we go forward, I think, and also of increasingly little value. This also exposed a few bugs in NLL mode due to increased testing. r? @pnkfelix cc @bobtwinkles
2018-04-17Auto merge of #49882 - Zoxc:sync-misc2, r=michaelwoeristerbors-5/+5
More thread-safety changes r? @michaelwoerister
2018-04-16Auto merge of #49433 - varkor:metadata-skip-mir-opt, r=michaelwoeristerbors-0/+4
Skip MIR encoding for cargo check Resolves #48662. r? @michaelwoerister
2018-04-16Use locks for Session.lint_store and Session.buffered_lintsJohn Kåre Alsaker-5/+5
2018-04-15Auto merge of #49947 - oli-obk:turing_complete_const_eval, r=nagisabors-3/+0
Don't abort const eval due to long running evals, just warn one check-box of #49930 r? @nagisa (https://github.com/rust-lang/rfcs/pull/2344#issuecomment-368246665)
2018-04-15remove -Znll -- borrowck=mir implies nll nowNiko Matsakis-2/+0
2018-04-14Rollup merge of #49922 - f-bro:zmiri, r=oli-obkkennytm-2/+0
Remove -Zmiri debugging option
2018-04-13Don't abort const eval due to long running evals, just warnOliver Schneider-3/+0
2018-04-13Remove -Z miri debugging optionFabio B-2/+0
2018-04-12Auto merge of #49558 - Zoxc:sync-misc, r=michaelwoeristerbors-132/+89
Even more thread-safety changes r? @michaelwoerister
2018-04-11Implementation of `#[repr(packed(n))]` RFC 1399.Cameron Hart-16/+21
2018-04-10Make Session.injected_panic_runtime thread-safeJohn Kåre Alsaker-2/+2
2018-04-10Make Session.injected_allocator and Session.allocator_kind thread-safeJohn Kåre Alsaker-4/+4
2018-04-10Make Session.dependency_formats thread-safeJohn Kåre Alsaker-3/+3
2018-04-10Make Session.crate_types thread-safeJohn Kåre Alsaker-2/+2
2018-04-10Make sure Session.plugin_attributes is only used on one threadJohn Kåre Alsaker-2/+2
2018-04-10Make sure Session.plugin_llvm_passes is only used on one threadJohn Kåre Alsaker-2/+2
2018-04-10Make Session.has_global_allocator thread-safeJohn Kåre Alsaker-2/+2
2018-04-10Make sure Session.imported_macro_spans is only used on one threadJohn Kåre Alsaker-2/+2
2018-04-10Make Session.crate_disambiguator thread-safeJohn Kåre Alsaker-6/+3
2018-04-10Make sure Session.next_node_id is only used on one threadJohn Kåre Alsaker-2/+2
2018-04-10Make Session.code_stats thread-safeJohn Kåre Alsaker-2/+2
2018-04-10Make Session::features_untracked thread-safeJohn Kåre Alsaker-11/+5
2018-04-10Disable optimization fuel when using multiple threadsJohn Kåre Alsaker-7/+15
2018-04-10Remove Cell from const_eval_stack_frame_limit and const_eval_step_limitJohn Kåre Alsaker-4/+4
2018-04-10Make sure Session.incr_comp_session is only used on one threadJohn Kåre Alsaker-2/+2
2018-04-10Make Session.plugin_registrar_fn and Session.derive_registrar_fn thread-safeJohn Kåre Alsaker-4/+4
2018-04-10Combine Session.entry_fn and Session.entry_type and make them thread-safeJohn Kåre Alsaker-7/+3
2018-04-10Make PerfStats thread-safe and remove unused fieldsJohn Kåre Alsaker-58/+16
2018-04-10Make recursion_limit and type_length_limit thread-safeJohn Kåre Alsaker-7/+7
2018-04-10Make sure the lint store is only used on one threadJohn Kåre Alsaker-5/+9
2018-04-06Auto merge of #48779 - michaelwoerister:share-generics4, r=alexcrichtonbors-0/+2
Allow for re-using monomorphizations in upstream crates. Followup to #48611. This implementation is pretty much finished modulo failing tests if there are any. Not quite ready for review yet though. ### DESCRIPTION This PR introduces a `share-generics` mode for RLIBs and Rust dylibs. When a crate is compiled in this mode, two things will happen: - before instantiating a monomorphization in the current crate, the compiler will look for that monomorphization in all upstream crates and link to it, if possible. - monomorphizations are not internalized during partitioning. Instead they are added to the list of symbols exported from the crate. This results in less code being translated and LLVMed. However, there are also downsides: - it will impede optimization somewhat, since fewer functions can be internalized, and - Rust dylibs will have bigger symbol tables since they'll also export monomorphizations. Consequently, this PR only enables the `shared-generics` mode for opt-levels `No`, `Less`, `Size`, and `MinSize`, and for when incremental compilation is activated. `-O2` and `-O3` will still generate generic functions per-crate. Another thing to note is that this has a somewhat similar effect as MIR-only RLIBs, in that monomorphizations are shared, but it is less effective because it cannot share monomorphizations between sibling crates: ``` A <--- defines `fn foo<T>() { .. }` / \ / \ B C <--- both call `foo<u32>()` \ / \ / D <--- calls `foo<u32>()` too ``` With `share-generics`, both `B` and `C` have to instantiate `foo<u32>` and only `D` can re-use it (from either `B` or `C`). With MIR-only RLIBs, `B` and `C` would not instantiate anything, and in `D` we would then only instantiate `foo<u32>` once. On the other hand, when there are many leaf crates in the graph (e.g. when compiling many individual test binaries) then the `share-generics` approach will often be more effective. ### TODO - [x] Add codegen test that makes sure monomorphizations can be internalized in non-Rust binaries. - [x] Add codegen-units test that makes sure we share generics. - [x] Add run-make test that makes sure we don't export any monomorphizations from non-Rust binaries. - [x] Review for reproducible-builds implications.
2018-04-06Allow for re-using monomorphizations from upstream crates.Michael Woerister-0/+2
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-2/+2
2018-04-04Add len() method to OutputTypesvarkor-0/+4
2018-03-31Auto merge of #49201 - Phlosioneer:add-trivial-size-hints, r=SimonSapinbors-0/+7
Implement some trivial size_hints for various iterators This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708. I intend to do more, but I don't want to make the PR too large.
2018-03-28Auto merge of #49019 - phil-opp:target-spec, r=pnkfelixbors-11/+26
Introduce a TargetTriple enum to support absolute target paths This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used. The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension). For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
2018-03-26Canonicalize pathsPhilipp Oppermann-2/+8
2018-03-26Introduce a TargetTriple enum to support absolute target pathsPhilipp Oppermann-10/+19
2018-03-26Auto merge of #48346 - emilio:pgo, r=alexcrichtonbors-0/+23
Add basic PGO support. This PR adds two mutually exclusive options for profile usage and generation using LLVM's instruction profile generation (the same as clang uses), `-C pgo-use` and `-C pgo-gen`. See each commit for details.
2018-03-25Auto merge of #49212 - kyrias:strip-debug-no-debuginfo, r=michaelwoeristerbors-0/+2
Pass --strip-debug to GccLinker when building without debuginfo C.f. #46034 --- This brings a hello-world built by passing rustc no command line options from 2.9M to 592K on Linux. (This might need to special case MacOS or Windows, not sure if the linkers there support `--strip-debug`, and there is an annoying lack of dependable docs for the linkers there.)
2018-03-25librustc_trans: Gate the preinliner with another -Z flag.Emilio Cobos Álvarez-0/+3
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>