You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few ongoing issues with the current compilation which are
fixed:
1. Ensured to provide a correct sysroot required for some of the clang
compilers according to rust-lang/rust-bindgen#1229
2. Automated the sysroot search both for ffmpeg build and bingen and
ensured that the path is valid (new xcode version appends \n which
breaks everythin)
3. Fixed some of the wronly passed parameters and enabled featuers for
hardeward decoding on ioss
if env::var("CARGO_FEATURE_BUILD").is_err() || env::var("HOST") == env::var("TARGET"){
202
+
returnNone;
203
+
}
204
+
205
+
ifletOk(sysroot) = env::var("SYSROOT"){
206
+
returnSome(sysroot.to_string());
207
+
}
208
+
209
+
if env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("ios"){
210
+
let xcode_output = Command::new("xcrun")
211
+
.args(["--sdk","iphoneos","--show-sdk-path"])
212
+
.output()
213
+
.expect("failed to run xcrun");
214
+
215
+
if !xcode_output.status.success(){
216
+
panic!("Failed to run xcrun to get the ios sysroot, please install xcode tools or provide sysroot using $SYSROOT env. Error: {}",String::from_utf8_lossy(&xcode_output.stderr));
217
+
}
218
+
219
+
let string = String::from_utf8(xcode_output.stdout)
220
+
.expect("Failed to parse xcrun output")
221
+
.replace("\n","");
222
+
223
+
if !Path::new(&string).exists(){
224
+
panic!("xcrun returned invalid sysroot path: {}", string);
225
+
}
226
+
227
+
returnSome(string);
228
+
}
229
+
230
+
println!("cargo:warnning=Detected cross compilation but sysroot not provided");
231
+
None
232
+
}
233
+
234
+
fnbuild(sysroot:Option<&str>) -> io::Result<()>{
199
235
let source_dir = source();
200
236
201
237
// Command's path is not relative to command's current_dir
0 commit comments