rust/src/test/run-make-fulldeps
bors 5fa94f3c57 Auto merge of #88368 - jyn514:metadata-error, r=petrochenkov
Improve error when an .rlib can't be parsed

This usually describes either an error in the compiler itself or some
sort of IO error. Either way, we should report it to the user rather
than just saying "crate not found".

This only gives an error if the crate couldn't be loaded at all - if the
compiler finds another .rlib or .rmeta file which was valid, it will
continue to compile the crate.

Example output:
```
error[E0785]: found invalid metadata files for crate `foo`
 --> bar.rs:3:24
  |
3 |         println!("{}", foo::FOO_11_49[0]);
  |                        ^^^
  |
  = warning: failed to parse rlib '/home/joshua/test-rustdoc/libfoo.rlib': Invalid archive extended name offset
```

cc `@ehuss`
2021-11-07 23:03:55 +00: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-no-oom-handling alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
allow-non-lint-warnings-cmdline Remove licenses 2018-12-25 21:08:33 -07:00
allow-warnings-cmdline-stability Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
archive-duplicate-names Update tests for extern block linting 2021-01-13 07:49:16 -05:00
arguments-non-c-like-enum test: address comments and pacify the merciless tidy. 2020-02-08 06:52:09 +02: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 Update tests for extern block linting 2021-01-13 07:49:16 -05:00
c-dynamic-rlib Update tests for extern block linting 2021-01-13 07:49:16 -05:00
c-link-to-rust-dylib Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
c-link-to-rust-staticlib Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
c-link-to-rust-va-list-fn va_args implementation for AAPCS. 2020-06-30 09:58:00 +01:00
c-static-dylib Update tests for extern block linting 2021-01-13 07:49:16 -05:00
c-static-rlib Update tests for extern block linting 2021-01-13 07:49:16 -05:00
c-unwind-abi-catch-lib-panic add integration tests, unwind across FFI boundary 2021-03-09 14:40:33 -05:00
c-unwind-abi-catch-panic add integration tests, unwind across FFI boundary 2021-03-09 14:40:33 -05:00
cat-and-grep-sanity-check rustc: Add a #[wasm_custom_section] attribute 2018-03-22 13:16:38 -07:00
cdylib Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
cdylib-dylib-linkage Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
cdylib-fewer-symbols Update code to account for extern ABI requirement 2021-01-13 07:49:45 -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 Update tests for extern block linting 2021-01-13 07:49:16 -05:00
compiler-lookup-paths-2 Remove licenses 2018-12-25 21:08:33 -07:00
compiler-rt-works-on-mingw Update tests for extern block linting 2021-01-13 07:49:16 -05:00
core-no-fp-fmt-parse core: add unstable no_fp_fmt_parse to disable float fmt/parse code 2021-07-02 22:52:37 +01:00
coverage Fix assertions in coverage-reports test 2021-08-04 07:47:09 -07:00
coverage-llvmir Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07:00
coverage-reports Update the minimum external LLVM to 11 2021-10-22 09:22:18 -07: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 Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05: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
doctests-keep-binaries Move test to run-make-fulldeps to avoid compiler flag bug 2021-08-31 18:06:18 -04: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 Update the minimum external LLVM to 7 2019-12-02 11:36:21 -08: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 intra_doc_resolution_failures -> broken_intra_doc_links 2020-07-30 10:38:55 -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 Add test for --extern alloc=librustc.rlib 2019-11-07 06:43:07 -08:00
extern-flag-pathless Add more --extern tests. 2019-11-07 05:51:17 -08:00
extern-flag-rename-transitive Remove licenses 2018-12-25 21:08:33 -07:00
extern-fn-generic Update tests for extern block linting 2021-01-13 07:49:16 -05:00
extern-fn-mangle Update tests for extern block linting 2021-01-13 07:49:16 -05:00
extern-fn-reachable Remove support for self-opening 2020-04-25 10:55:20 -04:00
extern-fn-struct-passing-abi Update tests for extern block linting 2021-01-13 07:49:16 -05:00
extern-fn-with-extern-types Update tests for extern block linting 2021-01-13 07:49:16 -05:00
extern-fn-with-packed-struct Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
extern-fn-with-union Update tests for extern block linting 2021-01-13 07:49:16 -05: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
foreign-exceptions Add -Zunstable-options instead of feature 2021-10-28 23:38:21 +02:00
fpic use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
glibc-staticlib-args Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
hir-tree Remove licenses 2018-12-25 21:08:33 -07:00
hotplug_codegen_backend Update run-make-fulldeps. 2021-09-30 19:41:32 +02:00
include_bytes_deps Remove doc(include) 2021-06-04 08:05:54 -04:00
incr-add-rust-src-component Add integration test for --remap-pathh-prefix 2021-04-29 12:53:59 +00:00
inline-always-many-cgu Revert "Auto merge of #76896 - spastorino:codegen-inline-fns2, r=davidtwco,wesleywiser" 2021-01-11 16:27:59 -03:00
interdependent-c-libraries Update tests for extern block linting 2021-01-13 07:49:16 -05:00
intrinsic-unreachable Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02:00
invalid-library Improve error when an .rlib can't be parsed 2021-11-07 15:03:40 +00: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 Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
issue-14698 Remove licenses 2018-12-25 21:08:33 -07:00
issue-15460 Update tests for extern block linting 2021-01-13 07:49:16 -05:00
issue-18943 Remove double trailing newlines 2019-04-22 16:57:01 +01:00
issue-19371 Fix src/test/run-make-fulldeps/issue-19371 2021-03-15 21:16:39 +08: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 Update tests for extern block linting 2021-01-13 07:49:16 -05: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 Update tests for extern block linting 2021-01-13 07:49:16 -05: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-37839 Remove some ignore-stage1 annotations. 2020-07-02 22:29:38 -07:00
issue-37893 Remove some ignore-stage1 annotations. 2020-07-02 22:29:38 -07: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-47551 Build crtbengin.o/crtend.o from source code 2021-05-31 11:11:38 +08:00
issue-51671 Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02:00
issue-53964 Remove licenses 2018-12-25 21:08:33 -07:00
issue-64153 Ignore issue-64153 run-make test on Windows since supporting a Windows version is not worth the trouble. 2019-10-28 17:07:25 +01:00
issue-68794-textrel-on-minimal-lib add regression test for issue #68794 2020-02-14 14:38:31 +01:00
issue-69368 Abort when catch_unwind catches a foreign exception 2020-08-27 21:08:30 +01:00
issue-83045 Fix #83045 by moving some crate loading verification code to a better place. 2021-03-26 09:59:10 +01:00
issue64319 Add regression test for #64319 back in. 2020-01-20 12:00:43 +01: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-through-symlinks Rename to RUSTC_LOG 2019-04-30 17:27:53 +09:00
libtest-json libtest: Make sed arguments compatible with apple 2020-11-29 02:14:49 +01:00
link-arg Remove licenses 2018-12-25 21:08:33 -07:00
link-args-order Remove attribute #[link_args] 2021-04-03 21:25:53 +03:00
link-cfg Update tests for extern block linting 2021-01-13 07:49:16 -05:00
link-dedup Add test for deduplicate native lib in linking 2021-05-22 19:51:26 +08:00
link-path-order Update tests for extern block linting 2021-01-13 07:49:16 -05:00
linkage-attr-on-static Update tests for extern block linting 2021-01-13 07:49:16 -05:00
long-linker-command-lines Update tests for extern block linting 2021-01-13 07:49:16 -05:00
long-linker-command-lines-cmd-exe Remove licenses 2018-12-25 21:08:33 -07:00
longjmp-across-rust Update tests for extern block linting 2021-01-13 07:49:16 -05: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 Update tests for extern block linting 2021-01-13 07:49:16 -05: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 unused ignore-license directives 2020-01-24 00:00:00 +00:00
manual-crate-name Remove licenses 2018-12-25 21:08:33 -07:00
manual-link Update tests for extern block linting 2021-01-13 07:49:16 -05:00
many-crates-but-no-match Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
metadata-flag-frobs-symbols Remove licenses 2018-12-25 21:08:33 -07:00
min-global-align Assert that locals have storage when used 2020-10-31 21:06:29 +01:00
mingw-export-call-convention Add test for #50176 2020-07-29 14:19:58 +02: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 Update tests for extern block linting 2021-01-13 07:49:16 -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
obtain-borrowck Fix test 2021-10-25 15:15:05 +02: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 Fix staticlib name for *-pc-windows-gnu targets 2020-04-09 00:33:05 +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
pass-non-c-like-enum-to-c test: use all: $(call NATIVE_STATICLIB,test) to build a C lib. 2020-02-08 13:40:50 +02:00
pgo-branch-weights Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pgo-gen Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pgo-gen-lto Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pgo-gen-no-imp-symbols Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pgo-indirect-call-promotion Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +02:00
pgo-use Allow combining -Cprofile-generate and -Cpanic=unwind when targeting 2021-07-20 11:41:51 +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 unstable --pretty flag 2021-04-23 09:58:34 -04:00
pretty-print-to-file Remove unstable --pretty flag 2021-04-23 09:58:34 -04:00
print-cfg ast: Fix naming conventions in AST structures 2021-11-07 21:38:17 +08:00
print-target-list Fix an sh error 2019-05-27 19:40:11 -05:00
profile Add -Z profile-emit=<path> for Gcov gcda output. 2020-05-27 14:10:40 -04:00
prune-link-args use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
redundant-libs Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02: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
remap-path-prefix Ignore test on Windows 2021-08-24 13:21:27 +01:00
reproducible-build Disable both reproducible-build tests for crate-type=bin 2021-09-15 13:37:22 -04:00
reproducible-build-2 Export ZERO_AR_DATE for macos linker invocations 2020-05-26 07:38:43 -07:00
resolve-rename Remove licenses 2018-12-25 21:08:33 -07:00
return-non-c-like-enum test: address comments and pacify the merciless tidy. 2020-02-08 06:52:09 +02:00
return-non-c-like-enum-from-c test: use all: $(call NATIVE_STATICLIB,test) to build a C lib. 2020-02-08 13:40:50 +02:00
rlib-chain Remove licenses 2018-12-25 21:08:33 -07:00
rustdoc-determinism add regression test for #61216 2020-07-03 11:24:05 -04: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-map-file Add full test for rustdoc map file 2021-02-23 11:13:35 +01:00
rustdoc-output-path Remove licenses 2018-12-25 21:08:33 -07:00
rustdoc-scrape-examples-macros Fix rustdoc-scrape-examples-macros test not being cross-platform 2021-11-05 09:32:04 -07:00
rustdoc-target-spec-json-path Do not allow JSON targets to set is-builtin: true 2021-07-08 23:50:12 +03:00
rustdoc-themes Clean up rustdoc static files 2021-07-07 17:52:18 +02:00
sanitizer-cdylib-link Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
sanitizer-dylib-link Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
sanitizer-staticlib-link Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
save-analysis Remove doc(include) 2021-06-04 08:05:54 -04:00
save-analysis-fail Update tests for extern block linting 2021-01-13 07:49:16 -05:00
save-analysis-rfc2126 Stabilize --extern flag without a path. 2019-11-07 05:51:17 -08:00
separate-link Add a test that rustc compiles and links separately 2020-12-23 12:51:10 +11:00
sepcomp-cci-copies Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02: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
share-generics-dylib Add regression test for shared-generics x dylibs (#67276). 2020-01-20 12:00:43 +01:00
simd-ffi expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +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
split-debuginfo Update the minimum external LLVM to 12 2021-10-22 10:50:07 -07:00
split-dwarf Update the minimum external LLVM to 12 2021-10-22 10:50:07 -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 Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05:00
static-extern-type Do not ICE in codegen given a extern_type static 2019-02-05 21:20:07 +00:00
static-nobundle Update tests for extern block linting 2021-01-13 07:49:16 -05:00
static-unwinding Remove licenses 2018-12-25 21:08:33 -07:00
staticlib-blank-lib Update tests for extern block linting 2021-01-13 07:49:16 -05:00
std-core-cycle Update code to account for extern ABI requirement 2021-01-13 07:49:45 -05: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 Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02: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 Set the library path in sysroot-crates-are-unstable 2021-09-16 17:30:36 -07:00
target-cpu-native use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
target-specs update test 2021-09-14 18:47:47 -04:00
target-without-atomic-cas Split non-CAS atomic support off into target_has_atomic_load_store 2019-10-08 20:34:30 +01:00
test-harness Remove licenses 2018-12-25 21:08:33 -07:00
type-mismatch-same-crate-name Remove compile-fail test suite 2020-12-29 23:39:56 +03: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 Fix various tests to run on windows-gnu 2020-07-17 20:45:29 +02: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-binary-no-external-deps [windows] Add testcase to make sure executables are self-contained 2020-04-11 21:16:27 +02: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 Add -Zunstable-options instead of feature 2021-10-28 23:38:21 +02:00