mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Use -target when linking binaries for Mac Catalyst
This commit is contained in:
parent
c1d5843661
commit
8553aeeb66
@ -2197,8 +2197,13 @@ fn add_apple_sdk(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavor) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if llvm_target.contains("macabi") {
|
||||||
|
cmd.args(&["-target", llvm_target])
|
||||||
|
} else {
|
||||||
let arch_name = llvm_target.split('-').next().expect("LLVM target must have a hyphen");
|
let arch_name = llvm_target.split('-').next().expect("LLVM target must have a hyphen");
|
||||||
cmd.args(&["-arch", arch_name, "-isysroot", &sdk_root, "-Wl,-syslibroot", &sdk_root]);
|
cmd.args(&["-arch", arch_name])
|
||||||
|
}
|
||||||
|
cmd.args(&["-isysroot", &sdk_root, "-Wl,-syslibroot", &sdk_root]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_apple_sdk_root(sdk_name: &str) -> Result<String, String> {
|
fn get_apple_sdk_root(sdk_name: &str) -> Result<String, String> {
|
||||||
|
Loading…
Reference in New Issue
Block a user