rust/src/test/run-make-fulldeps
bors 80a65bcaf2 Auto merge of #68448 - maurer:dyn-cdylib, r=alexcrichton
rustc: Allow cdylibs to link against dylibs

Previously, rustc mandated that cdylibs could only link against rlibs as dependencies (not dylibs).
This commit disables that restriction and tests that it works in a simple case.

I don't have a windows rustc dev environment, so I guessed at the MSVC test code, I'm hoping the CI can run that for me.

Additionally, we might want to consider emitting (through cargo or rustc) some metadata to help C users of a cdylib figure out where all the dylibs they need are. I don't think that should be needed to land this change, as it will still be usable by homogeneous build systems without it.

My new test was templated off the `tests/run-make-fulldeps/cdylib` test. It seemed more appropriate to have it as a separate test, since both foo.rs and bar.rs would need to be replicated to make that test cover both cases, but I can do that if it would be preferred.

If I'm doing anything out of order/process, please let me know; this is only my second change to rustc and the prior one was trivial.

r? alexcrichton
2020-01-25 07:49:40 +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-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 Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02: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 Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
c-dynamic-rlib Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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 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 unused ignore-license directives 2020-01-24 00:00:00 +00:00
c-static-rlib Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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-dylib-linkage rustc: Allow cdylibs to link against dylibs 2020-01-23 13:10:04 -08: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 Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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 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 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 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 Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
extern-fn-mangle Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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 unused ignore-license directives 2020-01-24 00:00:00 +00:00
extern-fn-with-packed-struct Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
extern-fn-with-union Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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 Abort if C++ tries to swallow a Rust panic 2020-01-11 10:18:44 +00:00
fpic use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
glibc-staticlib-args Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
hir-tree Remove licenses 2018-12-25 21:08:33 -07:00
hotplug_codegen_backend fix ui-fulldeps fallout 2020-01-05 12:49:22 +01: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 unused ignore-license directives 2020-01-24 00:00:00 +00:00
intrinsic-unreachable use ignore directives for run-make tests 2019-02-11 17:02:06 -05:00
invalid-library rustc_metadata: don't let LLVM confuse rmeta blobs for COFF object files. 2019-11-09 02:06:22 +02: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 fix src/test fallout 2020-01-02 22:12:46 +01: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 unused ignore-license directives 2020-01-24 00:00:00 +00: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 Hack to make C++ exceptions test work on i686-pc-windows-gnu 2019-11-03 14:03:21 +00: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
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
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-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 Update output-default.json and rustdoc test 2020-01-12 15:37:50 +00: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 unused ignore-license directives 2020-01-24 00:00:00 +00:00
linkage-attr-on-static Remove unused ignore-license directives 2020-01-24 00:00:00 +00:00
long-linker-command-lines Optimize long-linker-command-line test 2019-11-01 09:28:17 +01: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 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 Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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-branch-weights Attempt to fix intermittent failures of pgo-branch-weights test. 2020-01-03 10:40:15 +01: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-indirect-call-promotion PGO: Add regression test for indirect call promotion. 2019-11-22 13:52:55 +01: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-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 Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows). 2019-11-20 14:07:01 +01: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
rustdoc-themes Fix Makefile themes check 2019-11-18 18:53:45 +01: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-staticlib-link Remove unused ignore-license directives 2020-01-24 00:00:00 +00: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 Stabilize --extern flag without a path. 2019-11-07 05:51:17 -08: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
share-generics-dylib Add regression test for shared-generics x dylibs (#67276). 2020-01-20 12:00:43 +01:00
simd-ffi - remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!} 2020-01-08 04:25:33 +01: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 targeted revert of PR rust-lang/rust#64324 (just undo change to dylib generics export). 2019-11-01 15:05:45 +01: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 Change makefile back to python27. 2019-11-15 11:19:13 -08: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 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
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 Fix Makefile themes check 2019-11-18 18:53:45 +01:00