Skip to content

Commit e69d81e

Browse files
authored
Merge pull request alexcrichton#37 from arrtchiu/patch-3
support 64-bit ios simulator build
2 parents 3c49ff2 + a87824b commit e69d81e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ impl Build {
182182
"wasm32-unknown-emscripten" => "gcc",
183183
"wasm32-unknown-unknown" => "gcc",
184184
"aarch64-apple-ios" => "ios64-cross",
185+
"x86_64-apple-ios" => "iossimulator-xcrun",
185186
_ => panic!("don't know how to configure OpenSSL for {}", target),
186187
};
187188

@@ -249,6 +250,12 @@ impl Build {
249250
configure.arg(arg);
250251
}
251252

253+
if os.contains("iossimulator") {
254+
if let Some(ref isysr) = ios_isysroot {
255+
configure.env("CC", &format!("xcrun -sdk iphonesimulator cc -isysroot {}", sanitize_sh(&Path::new(isysr))));
256+
}
257+
}
258+
252259
if target == "x86_64-pc-windows-gnu" {
253260
// For whatever reason OpenSSL 1.1.1 fails to build on
254261
// `x86_64-pc-windows-gnu` in our docker container due to an

0 commit comments

Comments
 (0)