Fix using iOS mobile simulator on Intel Mac. (#5268)
This commit is contained in:
1 parent
20e242628d
commit
5d2f607681
1 file changed
+10
-1
@@ -933,7 +933,16 @@ impl BuildRequest {
|
|||||||
let sysroot_location = match triple.environment {
|
let sysroot_location = match triple.environment {
|
||||||
target_lexicon::Environment::Sim => xcode_path
|
target_lexicon::Environment::Sim => xcode_path
|
||||||
.join("Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"),
|
.join("Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk"),
|
||||||
_ => xcode_path.join("Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"),
|
_ => {
|
||||||
|
// If the target has been determined as the iOS x86 simulator above
|
||||||
|
if triple.to_string() == "x86_64-apple-ios" {
|
||||||
|
xcode_path.join(
|
||||||
|
"Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk",
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
xcode_path.join("Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk")
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if sysroot_location.exists() && !rustflags.flags.iter().any(|f| f == "-isysroot") {
|
if sysroot_location.exists() && !rustflags.flags.iter().any(|f| f == "-isysroot") {
|
||||||
|
|||||||
Reference in new issue
Block a user