Auto merge of #104572 - pkubaj:patch-1, r=cuviper
Fix build on powerpc-unknown-freebsd Probably also fixes build on arm and mips*. Related to https://github.com/rust-lang/rust/issues/104220
This commit is contained in:
commit
e10201c9bb
1 changed files with 8 additions and 6 deletions
|
@ -238,18 +238,20 @@ fn main() {
|
||||||
|
|
||||||
if !is_crossed {
|
if !is_crossed {
|
||||||
cmd.arg("--system-libs");
|
cmd.arg("--system-libs");
|
||||||
} else if target.contains("windows-gnu") {
|
}
|
||||||
println!("cargo:rustc-link-lib=shell32");
|
|
||||||
println!("cargo:rustc-link-lib=uuid");
|
if (target.starts_with("arm") && !target.contains("freebsd"))
|
||||||
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
|
|
||||||
println!("cargo:rustc-link-lib=z");
|
|
||||||
} else if target.starts_with("arm")
|
|
||||||
|| target.starts_with("mips-")
|
|| target.starts_with("mips-")
|
||||||
|| target.starts_with("mipsel-")
|
|| target.starts_with("mipsel-")
|
||||||
|| target.starts_with("powerpc-")
|
|| target.starts_with("powerpc-")
|
||||||
{
|
{
|
||||||
// 32-bit targets need to link libatomic.
|
// 32-bit targets need to link libatomic.
|
||||||
println!("cargo:rustc-link-lib=atomic");
|
println!("cargo:rustc-link-lib=atomic");
|
||||||
|
} else if target.contains("windows-gnu") {
|
||||||
|
println!("cargo:rustc-link-lib=shell32");
|
||||||
|
println!("cargo:rustc-link-lib=uuid");
|
||||||
|
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
|
||||||
|
println!("cargo:rustc-link-lib=z");
|
||||||
}
|
}
|
||||||
cmd.args(&components);
|
cmd.args(&components);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue