Skip to content

Commit

Permalink
Rename pass_link_args to pass_cdylib_link_args
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero committed Mar 11, 2019
1 parent 064afa6 commit f608ed6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn rustc<'a, 'cfg>(
// If we are a binary and the package also contains a library, then we
// don't pass the `-l` flags.
let pass_l_flag = unit.target.is_lib() || !unit.pkg.targets().iter().any(|t| t.is_lib());
let pass_link_args = unit.target.is_cdylib();
let pass_cdylib_link_args = unit.target.is_cdylib();
let do_rename = unit.target.allows_underscores() && !unit.mode.is_any_test();
let real_name = unit.target.name().to_string();
let crate_name = unit.target.crate_name();
Expand Down Expand Up @@ -258,7 +258,7 @@ fn rustc<'a, 'cfg>(
&build_state,
&build_deps,
pass_l_flag,
pass_link_args,
pass_cdylib_link_args,
current_id,
)?;
add_plugin_deps(&mut rustc, &build_state, &build_deps, &root_output)?;
Expand Down Expand Up @@ -348,7 +348,7 @@ fn rustc<'a, 'cfg>(
build_state: &BuildMap,
build_scripts: &BuildScripts,
pass_l_flag: bool,
pass_link_args: bool,
pass_cdylib_link_args: bool,
current_id: PackageId,
) -> CargoResult<()> {
for key in build_scripts.to_link.iter() {
Expand All @@ -370,7 +370,7 @@ fn rustc<'a, 'cfg>(
rustc.arg("-l").arg(name);
}
}
if pass_link_args {
if pass_cdylib_link_args {
for arg in output.linker_args.iter() {
let link_arg = format!("link-arg={}", arg);
rustc.arg("-C").arg(link_arg);
Expand Down

0 comments on commit f608ed6

Please sign in to comment.