Open Moxinilian opened 6 years ago
It seems like CI is broken for nightly. @Rhuagh
Thank you! This fixes my issues with building on OSX.
@Moxinilian thanks so much for this PR - super excited to hear you managed to get this going with iOS. I'd actually love to hear more about what you're using it for if you're free to share details on the project? Also, I'm guessing you were testing this on a version of macOS? May I ask which version of macOS it does work on?
Also @Rhuagh if you did get a chance to test this and it built fine, which version of macOS?
@mtak- which issue in particular were you running into prior to this PR? Also, if you don't mind me asking, which version of OSX and Xcode do you have on the system which is fixed by this PR?
In summary, I'm just trying to check which versions of macOS are working so far :) If anyone's reading this that happens to be on 10.10 or prior, it would be great to hear whether or not this branch works for you! Otherwise I'll have access to a macbook air which might have 10.10 installed within a weeks time for testing. It would be nice to land this.
I used latest High Sierra. Come to think of it, I believe we may have fixed without wanting it building for all platforms, either MacOSX or iPhoneOS, considering we're requesting the location of the SDK to Xcode itself. I'm not sure if changing the sysroot is enough however, that would require testing.
@mitchmindtree I was trying to build ggez for iOS, (among other game libraries). Just to see what was currently possible with rust. I don't recall the particular issue, but it was definitely path related. So far nothing is really working, so I have no idea if this PR does more than let me build.
I have a couple of notes on the PR that might help as well.
iPhoneSimulator
is never detected as a platform in the build script even though it is a separate sdk from iPhoneOS
(the i386 and x86_64 apple-ios targets should use this platform).--target=
which helps with dropping the erroneous sysroot bindgen appends
.clang_arg(format!("--target={}", TARGET_TRIPLE))
Possibly unnecessary flags for your project, but helped with getting other ios bindgen scripts to work
.clang_arg("-x")
.clang_arg("objective-c")
I am no longer using this as a dependency, hope that helps
Ah, osx version is 10.13.6 Beta (17G47b) - High Sierra
This code is fairly old, but I do remember dropping iPhoneSimulator because it was causing issues somewhere, but I don't remember where exactly. Also, what is erroneous with the sysroot argument?
Not your sysroot argument. IIRC, at some point bindgen was adding an incorrect sysroot on osx when cross compiling for iOS. I can no longer find it in the bindgen master source.
Sorry for the confusion
This fixes the generation of bindings for iOS. Huge thanks to @huhlig for the help to make this work.