]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #68448 - maurer:dyn-cdylib, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 25 Jan 2020 07:49:40 +0000 (07:49 +0000)
committerbors <bors@rust-lang.org>
Sat, 25 Jan 2020 07:49:40 +0000 (07:49 +0000)
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


Trivial merge