rust/src/test/run-make-fulldeps
Alex Crichton 1a4330d2a2 rustc: Handle modules in "fat" LTO more robustly
When performing a "fat" LTO the compiler has a whole mess of codegen
units that it links together. To do this it needs to select one module
as a "base" module and then link everything else into this module.
Previously LTO passes assume that there's at least one module in-memory
to link into, but nowadays that's not always true! With incremental
compilation modules may actually largely be cached and it may be
possible that there's no in-memory modules to work with.

This commit updates the logic of the LTO backend to handle modules a bit
more uniformly during a fat LTO. This commit immediately splits them
into two lists, one serialized and one in-memory. The in-memory list is
then searched for the largest module and failing that we simply
deserialize the first serialized module and link into that. This
refactoring avoids juggling three lists, two of which are serialized
modules and one of which is half serialized and half in-memory.

Closes #63349
2019-08-27 13:51:14 -07:00
..
a-b-a-linker-guard test: force legacy mangling for run-make-fulldeps/a-b-a-linker-guard. 2019-05-31 18:24:54 +03:00
alloc-extern-crates Make use of ptr::null(_mut) instead of casting zero 2019-06-17 10:52:46 +00:00
allow-non-lint-warnings-cmdline Remove licenses 2018-12-25 21:08:33 -07:00
allow-warnings-cmdline-stability Remove licenses 2018-12-25 21:08:33 -07:00
archive-duplicate-names Remove licenses 2018-12-25 21:08:33 -07:00
atomic-lock-free Remove licenses 2018-12-25 21:08:33 -07:00
bare-outfile Remove licenses 2018-12-25 21:08:33 -07:00
c-dynamic-dylib use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
c-dynamic-rlib use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
c-link-to-rust-dylib Remove licenses 2018-12-25 21:08:33 -07:00
c-link-to-rust-staticlib use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
c-link-to-rust-va-list-fn Expose VaListImpl as the Rust equivalent of __va_list_tag and implement Clone for it. 2019-06-17 16:04:49 -07:00
c-static-dylib Remove licenses 2018-12-25 21:08:33 -07:00
c-static-rlib Remove licenses 2018-12-25 21:08:33 -07:00
cat-and-grep-sanity-check rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
cdylib Remove licenses 2018-12-25 21:08:33 -07:00
cdylib-fewer-symbols use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
codegen-options-parsing Remove licenses 2018-12-25 21:08:33 -07:00
compile-stdin rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
compiler-lookup-paths Remove licenses 2018-12-25 21:08:33 -07:00
compiler-lookup-paths-2 Remove licenses 2018-12-25 21:08:33 -07:00
compiler-rt-works-on-mingw use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
crate-data-smoke Remove licenses 2018-12-25 21:08:33 -07:00
crate-name-priority Remove licenses 2018-12-25 21:08:33 -07:00
cross-lang-lto bootstrap: Don't add LLVM's bin directory to the PATH for tool invocations. 2019-04-29 14:55:29 +02:00
cross-lang-lto-clang bootstrap: Don't add LLVM's bin directory to the PATH for tool invocations. 2019-04-29 14:55:29 +02:00
cross-lang-lto-pgo-smoketest Stabilize profile-guided optimization. 2019-06-21 09:54:58 +02:00
cross-lang-lto-upstream-rlibs bootstrap: Don't add LLVM's bin directory to the PATH for tool invocations. 2019-04-29 14:55:29 +02:00
debug-assertions Remove licenses 2018-12-25 21:08:33 -07:00
dep-info use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
dep-info-doesnt-run-much Remove licenses 2018-12-25 21:08:33 -07:00
dep-info-spaces use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
duplicate-output-flavors Remove licenses 2018-12-25 21:08:33 -07:00
dylib-chain Remove licenses 2018-12-25 21:08:33 -07:00
emit Remove licenses 2018-12-25 21:08:33 -07:00
emit-stack-sizes use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
error-found-staticlib-instead-crate Remove licenses 2018-12-25 21:08:33 -07:00
error-writing-dependencies Remove licenses 2018-12-25 21:08:33 -07:00
exit-code Remove licenses 2018-12-25 21:08:33 -07:00
extern-diff-internal-name Remove licenses 2018-12-25 21:08:33 -07:00
extern-flag-disambiguates Remove licenses 2018-12-25 21:08:33 -07:00
extern-flag-fun Remove licenses 2018-12-25 21:08:33 -07:00
extern-flag-rename-transitive Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-generic Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-mangle Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-reachable Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-struct-passing-abi Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-with-extern-types Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-with-packed-struct Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-with-union Remove licenses 2018-12-25 21:08:33 -07:00
extern-multiple-copies Remove licenses 2018-12-25 21:08:33 -07:00
extern-multiple-copies2 Remove licenses 2018-12-25 21:08:33 -07:00
extern-overrides-distribution Remove licenses 2018-12-25 21:08:33 -07:00
extra-filename-with-temp-outputs Remove licenses 2018-12-25 21:08:33 -07:00
fpic use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
hir-tree Remove licenses 2018-12-25 21:08:33 -07:00
hotplug_codegen_backend rustc: Compile the fmt_macros crate as an rlib 2019-07-29 08:15:08 -07:00
include_bytes_deps use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
inline-always-many-cgu Remove licenses 2018-12-25 21:08:33 -07:00
interdependent-c-libraries Remove licenses 2018-12-25 21:08:33 -07:00
intrinsic-unreachable use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
invalid-library Remove licenses 2018-12-25 21:08:33 -07:00
invalid-staticlib rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
issue-7349 Remove licenses 2018-12-25 21:08:33 -07:00
issue-11908 Remove licenses 2018-12-25 21:08:33 -07:00
issue-14500 Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
issue-14698 Remove licenses 2018-12-25 21:08:33 -07:00
issue-15460 Remove licenses 2018-12-25 21:08:33 -07:00
issue-18943 Remove double trailing newlines 2019-04-22 16:57:01 +01:00
issue-19371 Remove lint annotations in specific crates that are already enforced by rustbuild 2019-07-28 18:46:24 +03:00
issue-20626 Remove licenses 2018-12-25 21:08:33 -07:00
issue-22131 Remove licenses 2018-12-25 21:08:33 -07:00
issue-24445 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-25581 Remove licenses 2018-12-25 21:08:33 -07:00
issue-26006 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-26092 Remove licenses 2018-12-25 21:08:33 -07:00
issue-28595 Remove double trailing newlines 2019-04-22 16:57:01 +01:00
issue-28766 Remove licenses 2018-12-25 21:08:33 -07:00
issue-30063 Remove licenses 2018-12-25 21:08:33 -07:00
issue-33329 Remove licenses 2018-12-25 21:08:33 -07:00
issue-35164 Remove licenses 2018-12-25 21:08:33 -07:00
issue-36710 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-37839 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-37893 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-38237 Remove licenses 2018-12-25 21:08:33 -07:00
issue-40535 Remove licenses 2018-12-25 21:08:33 -07:00
issue-46239 Remove licenses 2018-12-25 21:08:33 -07:00
issue-51671 use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
issue-53964 Remove licenses 2018-12-25 21:08:33 -07:00
issues-41478-43796 Remove licenses 2018-12-25 21:08:33 -07:00
libs-and-bins Remove licenses 2018-12-25 21:08:33 -07:00
libs-search-path use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
libs-through-symlinks Rename to RUSTC_LOG 2019-04-30 17:27:53 +09:00
libtest-json libtest: support display_output in JSON formatter 2019-07-12 01:56:43 +02:00
link-arg Remove licenses 2018-12-25 21:08:33 -07:00
link-cfg Make tests compatible with musl host 2019-05-10 16:12:47 +02:00
link-path-order Remove licenses 2018-12-25 21:08:33 -07:00
linkage-attr-on-static Remove licenses 2018-12-25 21:08:33 -07:00
linker-output-non-utf8 Make tests compatible with musl host 2019-05-10 16:12:47 +02:00
long-linker-command-lines Remove licenses 2018-12-25 21:08:33 -07:00
long-linker-command-lines-cmd-exe Remove licenses 2018-12-25 21:08:33 -07:00
longjmp-across-rust Remove licenses 2018-12-25 21:08:33 -07:00
ls-metadata Remove licenses 2018-12-25 21:08:33 -07:00
lto-dylib-dep Remove leading newlines 2019-04-22 17:01:33 +01:00
lto-empty rustc: Handle modules in "fat" LTO more robustly 2019-08-27 13:51:14 -07:00
lto-no-link-whole-rlib Remove double trailing newlines 2019-04-22 16:57:01 +01:00
lto-readonly-lib Remove licenses 2018-12-25 21:08:33 -07:00
lto-smoke Remove licenses 2018-12-25 21:08:33 -07:00
lto-smoke-c Remove licenses 2018-12-25 21:08:33 -07:00
manual-crate-name Remove licenses 2018-12-25 21:08:33 -07:00
manual-link Remove licenses 2018-12-25 21:08:33 -07:00
many-crates-but-no-match Remove licenses 2018-12-25 21:08:33 -07:00
metadata-flag-frobs-symbols Remove licenses 2018-12-25 21:08:33 -07:00
min-global-align use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
mismatching-target-triples Remove licenses 2018-12-25 21:08:33 -07:00
missing-crate-dependency Remove licenses 2018-12-25 21:08:33 -07:00
mixing-deps Remove licenses 2018-12-25 21:08:33 -07:00
mixing-formats Remove licenses 2018-12-25 21:08:33 -07:00
mixing-libs Remove licenses 2018-12-25 21:08:33 -07:00
msvc-opt-minsize Remove licenses 2018-12-25 21:08:33 -07:00
multiple-emits Remove licenses 2018-12-25 21:08:33 -07:00
no-builtins-lto Remove licenses 2018-12-25 21:08:33 -07:00
no-duplicate-libs Remove licenses 2018-12-25 21:08:33 -07:00
no-integrated-as use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
no-intermediate-extras Remove licenses 2018-12-25 21:08:33 -07:00
obey-crate-type-flag Remove licenses 2018-12-25 21:08:33 -07:00
output-filename-conflicts-with-directory Remove licenses 2018-12-25 21:08:33 -07:00
output-filename-overwrites-input Remove licenses 2018-12-25 21:08:33 -07:00
output-type-permutations rustc: codegen: Build import library for all windows targets 2019-07-25 21:30:08 +02:00
output-with-hyphens Remove licenses 2018-12-25 21:08:33 -07:00
override-aliased-flags Move run-make test to run-make-fulldeps 2019-05-05 10:45:10 +01:00
panic-impl-transitive Remove licenses 2018-12-25 21:08:33 -07:00
pgo-gen Stabilize profile-guided optimization. 2019-06-21 09:54:58 +02:00
pgo-gen-lto Stabilize profile-guided optimization. 2019-06-21 09:54:58 +02:00
pgo-gen-no-imp-symbols Stabilize profile-guided optimization. 2019-06-21 09:54:58 +02:00
pgo-use Stabilize profile-guided optimization. 2019-06-21 09:54:58 +02:00
prefer-dylib Remove licenses 2018-12-25 21:08:33 -07:00
prefer-rlib Remove licenses 2018-12-25 21:08:33 -07:00
pretty-expanded Remove derives Encodable/Decodable and unstabilize attribute #[bench] 2019-07-31 21:27:59 +03:00
pretty-print-path-suffix Remove licenses 2018-12-25 21:08:33 -07:00
pretty-print-to-file Remove licenses 2018-12-25 21:08:33 -07:00
print-cfg rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
print-target-list Fix an sh error 2019-05-27 19:40:11 -05:00
profile Use new needs-(profiler|sanitizer)-support compiletest directive to clean up some run-make tests. 2019-04-18 15:49:41 +02:00
prune-link-args use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
redundant-libs Ignore test on Windows 2019-03-19 14:53:19 -04:00
relocation-model Remove licenses 2018-12-25 21:08:33 -07:00
relro-levels use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
reproducible-build Stop test from running on Windows. 2019-08-09 09:24:45 -07:00
reproducible-build-2 Hash the remapped sysroot instead of the original. 2019-08-12 13:40:22 -07:00
resolve-rename Remove licenses 2018-12-25 21:08:33 -07:00
rlib-chain Remove licenses 2018-12-25 21:08:33 -07:00
rustdoc-error-lines upgrade rustdoc's pulldown-cmark to 0.4.1 2019-04-22 09:11:26 -04:00
rustdoc-io-error use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
rustdoc-output-path Remove licenses 2018-12-25 21:08:33 -07:00
sanitizer-address Use new needs-(profiler|sanitizer)-support compiletest directive to clean up some run-make tests. 2019-04-18 15:49:41 +02:00
sanitizer-cdylib-link Fix ignore-logic for sanitizer run-make tests. 2019-04-24 11:14:24 +02:00
sanitizer-dylib-link Fix ignore-logic for sanitizer run-make tests. 2019-04-24 11:14:24 +02:00
sanitizer-invalid-cratetype Use new needs-(profiler|sanitizer)-support compiletest directive to clean up some run-make tests. 2019-04-18 15:49:41 +02:00
sanitizer-invalid-target Remove licenses 2018-12-25 21:08:33 -07:00
sanitizer-leak Use new needs-(profiler|sanitizer)-support compiletest directive to clean up some run-make tests. 2019-04-18 15:49:41 +02:00
sanitizer-memory Permit use of mem::uninitialized via allow(deprecated) 2019-07-04 21:01:35 -04:00
sanitizer-staticlib-link Rollup merge of #60038 - michaelwoerister:pgo-updates-2, r=alexcrichton 2019-04-25 03:05:22 +02:00
save-analysis Remove derives Encodable/Decodable and unstabilize attribute #[bench] 2019-07-31 21:27:59 +03:00
save-analysis-fail Remove licenses 2018-12-25 21:08:33 -07:00
save-analysis-rfc2126 remove extern_in_paths. 2019-01-13 14:18:00 +01:00
sepcomp-cci-copies Remove licenses 2018-12-25 21:08:33 -07:00
sepcomp-inlining Remove licenses 2018-12-25 21:08:33 -07:00
sepcomp-separate Remove licenses 2018-12-25 21:08:33 -07:00
simd-ffi Introduce built-in macros through libcore 2019-07-26 13:09:54 +03:00
simple-dylib Remove licenses 2018-12-25 21:08:33 -07:00
simple-rlib Remove licenses 2018-12-25 21:08:33 -07:00
stable-symbol-names test: support both (legacy and v0) choices of mangling. 2019-05-31 18:24:53 +03:00
static-dylib-by-default Remove licenses 2018-12-25 21:08:33 -07:00
static-extern-type Do not ICE in codegen given a extern_type static 2019-02-05 21:20:07 +00:00
static-nobundle Remove licenses 2018-12-25 21:08:33 -07:00
static-unwinding Remove licenses 2018-12-25 21:08:33 -07:00
staticlib-blank-lib Remove licenses 2018-12-25 21:08:33 -07:00
std-core-cycle Remove licenses 2018-12-25 21:08:33 -07:00
stdin-non-utf8 rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
suspicious-library Remove licenses 2018-12-25 21:08:33 -07:00
symbol-visibility test: support both (legacy and v0) choices of mangling. 2019-05-31 18:24:53 +03:00
symbols-include-type-name Remove licenses 2018-12-25 21:08:33 -07:00
symlinked-extern use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
symlinked-libraries use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
symlinked-rlib use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
sysroot-crates-are-unstable Stabilize the alloc crate. 2019-04-12 20:07:30 +02:00
target-cpu-native use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
target-specs Remove licenses 2018-12-25 21:08:33 -07:00
target-without-atomic-cas update run-pass test 2018-07-05 20:18:19 -05:00
test-harness Remove licenses 2018-12-25 21:08:33 -07:00
treat-err-as-bug update treat-err-as-bug test 2019-03-07 15:25:32 -08:00
type-mismatch-same-crate-name Remove licenses 2018-12-25 21:08:33 -07:00
use-extern-for-plugins Remove bitrig support from rust 2019-05-13 11:09:06 +02:00
use-suggestions-rust-2018 Remove licenses 2018-12-25 21:08:33 -07:00
used use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
version rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
volatile-intrinsics Remove licenses 2018-12-25 21:08:33 -07:00
weird-output-filenames Remove licenses 2018-12-25 21:08:33 -07:00
windows-spawn use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
windows-subsystem Remove double trailing newlines 2019-04-22 16:57:01 +01:00
tools.mk Remove bitrig support from rust 2019-05-13 11:09:06 +02:00