rust/src/test/incremental
Alex Crichton c7bd5a635e Fix disagreeement about CGU reuse and LTO
This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006
2020-05-09 19:30:48 -07:00
..
add_private_fn_at_krate_root_cc Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
auxiliary Moved issue tests to subdirs and normalised names. 2019-03-14 01:00:49 +00:00
callee_caller_cross_crate Update tests 2019-03-30 18:43:26 +01:00
change_add_field Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_crate_order Remove double trailing newlines 2019-04-22 16:57:01 +01:00
change_implementation_cross_crate Add a test for #37333 2020-01-01 13:07:41 +01:00
change_private_fn Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_private_fn_cc Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_private_impl_method Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_private_impl_method_cc Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_pub_inherent_method_body Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
change_pub_inherent_method_sig Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
const-generics update tests 2020-03-31 19:01:49 +02:00
extern_static Remove licenses 2018-12-25 21:08:33 -07:00
hashes const prop: don't special case return place 2020-04-20 21:18:20 +02:00
inlined_hir_34991 Replace Hir with hir_owner in tests 2020-03-14 22:52:31 +01:00
issue-39828 Remove licenses 2018-12-25 21:08:33 -07:00
issue-49595 Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
krate_reassign_34991 Remove double trailing newlines 2019-04-22 16:57:01 +01:00
remapped_paths_cc Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
remove-private-item-cross-crate Remove licenses 2018-12-25 21:08:33 -07:00
remove_crate Remove licenses 2018-12-25 21:08:33 -07:00
remove_source_file Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
rlib_cross_crate Update tests 2019-03-30 18:43:26 +01:00
span_hash_stable Replace Hir with hir_owner in tests 2020-03-14 22:52:31 +01:00
static_cycle Remove licenses 2018-12-25 21:08:33 -07:00
static_refering_to_other_static Remove licenses 2018-12-25 21:08:33 -07:00
static_refering_to_other_static2 Remove licenses 2018-12-25 21:08:33 -07:00
static_refering_to_other_static3 Remove licenses 2018-12-25 21:08:33 -07:00
static_stable_hash Remove licenses 2018-12-25 21:08:33 -07:00
struct_change_field_type_cross_crate Update tests 2019-03-30 18:43:26 +01:00
thinlto Tests. 2020-04-14 10:52:19 -04:00
type_alias_cross_crate Update tests 2019-03-30 18:43:26 +01:00
cache_file_headers.rs Remove licenses 2018-12-25 21:08:33 -07:00
change_crate_dep_kind.rs Re-enable Emscripten's exception handling support 2019-10-25 15:16:36 -07:00
change_name_of_static_in_fn.rs Remove leading newlines 2019-04-22 17:01:33 +01:00
change_symbol_export_status.rs fix pre-expansion linting infra 2020-03-18 15:08:25 +01:00
commandline-args.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
crate_hash_reorder.rs Move the krate method to Hir and remove the Krate dep node 2020-02-06 13:23:32 +01:00
cyclic-trait-hierarchy.rs fix various typos 2020-03-06 15:19:31 +01:00
delayed_span_bug.rs was not the same replace as others 2019-11-05 22:49:19 +01:00
dirty_clean.rs Update tests 2019-03-30 18:43:26 +01:00
feature_gate.rs update tests for migrate mode by default 2019-04-22 08:40:08 +01:00
foreign.rs Added ignore-sgx for appropriate tests 2019-05-16 14:29:12 -07:00
hello_world.rs Update tests 2019-03-30 18:43:26 +01:00
ich_method_call_trait_scope.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
ich_nested_items.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
ich_resolve_results.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
incremental_proc_macro.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
issue-35593.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-38222.rs Move the krate method to Hir and remove the Krate dep node 2020-02-06 13:23:32 +01:00
issue-39569.rs Remove double trailing newlines 2019-04-22 16:57:01 +01:00
issue-42602.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
issue-49043.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-49482.rs Moved issue tests to subdirs and normalised names. 2019-03-14 01:00:49 +00:00
issue-51409.rs Remove licenses 2018-12-25 21:08:33 -07:00
issue-54059.rs Moved issue tests to subdirs and normalised names. 2019-03-14 01:00:49 +00:00
issue-54242.rs Set the query in the ImplicitCtxt before trying to mark it green 2019-02-12 05:48:39 +01:00
issue-59523-on-implemented-is-not-unused.rs gate rustc_on_unimplemented under rustc_attrs 2019-11-06 07:34:51 +01:00
issue-59524-layout-scalar-valid-range-is-not-unused.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
issue-60629.rs add regression test for #60629 2019-05-10 12:59:40 +02:00
issue-61323.rs Make try_mark_previous_green aware of cycles. 2019-12-06 12:48:53 +03:00
issue-61530.rs Revert "Rollup merge of #69280 - ecstatic-morse:promote-shuffle-no-special-case, r=petrochenkov" 2020-02-20 16:00:39 -08:00
issue-62649-path-collisions-happen.rs Collisions in the dep-graph due to path-reuse are rare but can occur. 2020-01-27 17:06:06 +01:00
issue-69596.rs Add test for #69596 2020-03-14 22:52:31 +01:00
krate-inherent.rs Move the krate method to Hir and remove the Krate dep node 2020-02-06 13:23:32 +01:00
krate-inlined.rs Move the krate method to Hir and remove the Krate dep node 2020-02-06 13:23:32 +01:00
lto-in-linker.rs Fix disagreeement about CGU reuse and LTO 2020-05-09 19:30:48 -07:00
lto.rs rustc: Implement incremental "fat" LTO 2019-02-12 04:58:31 -08:00
macro_export.rs Migrate compile-pass annotations to build-pass 2019-07-03 06:30:28 +09:00
no_mangle.rs compiletest: Remove skip-codegen 2019-06-16 12:23:22 +03:00
rlib-lto.rs Fix disagreeement about CGU reuse and LTO 2020-05-09 19:30:48 -07:00
source_loc_macros.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
spans_in_type_debuginfo.rs Upgrade Emscripten targets to use upstream LLVM backend 2019-10-16 17:06:48 -07:00
spans_significant_w_debuginfo.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
spans_significant_w_panic.rs Add no_hash to query macro and move some queries over 2019-03-20 16:06:09 +01:00
spike-neg1.rs Remove licenses 2018-12-25 21:08:33 -07:00
spike-neg2.rs Remove licenses 2018-12-25 21:08:33 -07:00
spike.rs Remove licenses 2018-12-25 21:08:33 -07:00
string_constant.rs hir: replace "items" terminology with "nodes" where appropriate. 2020-03-19 14:36:04 +02:00
struct_add_field.rs Update tests 2019-03-30 18:43:26 +01:00
struct_change_field_name.rs Update tests 2019-03-30 18:43:26 +01:00
struct_change_field_type.rs Update tests 2019-03-30 18:43:26 +01:00
struct_change_nothing.rs Update tests 2019-03-30 18:43:26 +01:00
struct_remove_field.rs Update tests 2019-03-30 18:43:26 +01:00
unchecked_dirty_clean.rs Replace Hir with hir_owner in tests 2020-03-14 22:52:31 +01:00
warnings-reemitted.rs Moving more build-pass tests to check-pass 2020-04-23 20:21:38 -07:00