Skip to content

Commit 10ee101

Browse files
committed
Accept rustc-link-arg-cdylib in addition to rustc-cdylib-link-arg.
1 parent 9fca624 commit 10ee101

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/cargo/core/compiler/custom_build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,9 @@ impl BuildOutput {
546546
}
547547
"rustc-link-lib" => library_links.push(value.to_string()),
548548
"rustc-link-search" => library_paths.push(PathBuf::from(value)),
549-
"rustc-cdylib-link-arg" => linker_args.push((Some(LinkType::Cdylib), value)),
549+
"rustc-link-arg-cdylib" | "rustc-cdylib-link-arg" => {
550+
linker_args.push((Some(LinkType::Cdylib), value))
551+
}
550552
"rustc-link-arg-bins" => {
551553
if extra_link_arg {
552554
linker_args.push((Some(LinkType::Bin), value));

src/cargo/util/config/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ fn parse_links_overrides(
132132
.library_paths
133133
.extend(list.iter().map(|v| PathBuf::from(&v.0)));
134134
}
135-
"rustc-cdylib-link-arg" => {
135+
"rustc-link-arg-cdylib" | "rustc-cdylib-link-arg" => {
136136
let args = value.list(key)?;
137137
let args = args.iter().map(|v| (Some(LinkType::Cdylib), v.0.clone()));
138138
output.linker_args.extend(args);

0 commit comments

Comments
 (0)