-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create SDL3 stub library (.tbd) for use by the xcode projects of SDL satellite libraries #438
Comments
Can anyone try the attached tbd? I used the tests of https://github.com/apple-oss-distributions/tapi as reference. edit: updated the zip |
How do we use it? |
I don't know :) I think you should just link to the stub instead of the dylib or framework. |
Okay, I’ll do some research on it next week. |
In SDL3.framework/Versions/A should reside SDL3.tdb instead of binary SDL3: Apple's ld (if it's new enough which for most if not all users it will be and be linked to Apple's liptapi) will use it for linking programs to SDL3 framework. However, we are providing binaries, i.e. not just for linking to but for running against, therefore I don't know whether this is something we want in our releases. BTW, using |
It's useful for faster ci, and also useful for the satellite xcode projects to not need a pre-built SDL framework. |
Thinking about it though, how are we going to run test programs e.g. in SDL_image without real SDL3.framework present? |
This is purely about building the application, and let the user worry about where to get binaries. It would be useful to generate something similar to sezero's tbds, but minus the magic numbers and also supporting all platforms (ios/tvos/macos/xros/..) on all archs. |
I meant in CI |
This will not be useful for the SDL_image project (though, it will speed up creating SDL release artifacts a little bit), but only for those workflows that only build and don't test (or run the tests later). It would also allow to reduce the size of the SDL2_image source archive. |
I have looked into how to use/generate TBDs. Here is what a minimal SDL3 tbd would look like for the current pre-release: ---
archs: [ x86_64, arm64 ]
platform: macosx
install-name: '@rpath/SDL3.framework/SDL3'
current-version: 3.1.3
exports:
- archs: [ x86_64, arm64 ]
symbols: [ <SDL public functions here> ]
... While this "hardcodes" an install-name, it seems that As to how it can be shipped, it can either be provided as a framework by substituting the Interestingly, replacing a Here are some examples I crafted:
They can both be linked like their binary counterpart ( |
The xcode projects of all SDL satellite libraries require SDL to be checked out as a submodule.
Example: SDL_Image/Xcode/SDL_image.xcodeproj.
I think it would be useful to create a tbd (text-based description) of the SDL3 framework and use that instead in the satellite projects.
Looks like tapi/tapi-stubify does this job
Advantages:
The text was updated successfully, but these errors were encountered: