We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80c47b7 commit 48e0306Copy full SHA for 48e0306
src/cargo/core/compiler/mod.rs
@@ -792,7 +792,7 @@ fn build_base_args(
792
}
793
794
let prefer_dynamic = (unit.target.for_host() && !unit.target.is_custom_build())
795
- || (crate_types.contains(&CrateType::Dylib) && bcx.ws.members().any(|p| *p != unit.pkg));
+ || (crate_types.contains(&CrateType::Dylib) && !cx.is_primary_package(unit));
796
if prefer_dynamic {
797
cmd.arg("-C").arg("prefer-dynamic");
798
0 commit comments