Skip to content

Commit 48913c3

Browse files
committed
Pass link args to dependents.
1 parent 10ee101 commit 48913c3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ fn rustc(cx: &mut Context<'_, '_>, unit: &Unit, exec: &Arc<dyn Executor>) -> Car
357357
for path in output.library_paths.iter() {
358358
rustc.arg("-L").arg(path);
359359
}
360+
360361
if key.0 == current_id {
361362
for cfg in &output.cfgs {
362363
rustc.arg("--cfg").arg(cfg);
@@ -366,11 +367,12 @@ fn rustc(cx: &mut Context<'_, '_>, unit: &Unit, exec: &Arc<dyn Executor>) -> Car
366367
rustc.arg("-l").arg(name);
367368
}
368369
}
369-
if link_type.is_some() {
370-
for (lt, arg) in &output.linker_args {
371-
if lt.is_none() || *lt == link_type {
372-
rustc.arg("-C").arg(format!("link-arg={}", arg));
373-
}
370+
}
371+
372+
if link_type.is_some() {
373+
for (lt, arg) in &output.linker_args {
374+
if lt.is_none() || *lt == link_type {
375+
rustc.arg("-C").arg(format!("link-arg={}", arg));
374376
}
375377
}
376378
}

0 commit comments

Comments
 (0)