-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Provide a minimum OS version for MachO objects #8323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please add a comment echoing the info in the PR description.
09de11e
to
e4d7c75
Compare
Done! As I'm thinking about this, we should probably do something similar for iOS |
This gives LLVM enough information to generate a "platform load-command" in the object file. Fixes #7941
e4d7c75
to
6cb4d84
Compare
@steven-johnson -- I changed the approach to use the LLVM-computed minimum compatible version (e.g. 11 on macOS/ARM). This should generalize to iOS, watchOS, tvOS, etc. |
I think this may have injected a link error in google when building for the iOS Simulator (which is not considered macOS by the linker), but I don't have time to diagnose before leaving for vacation -- hoping @vksnk can look at it next week |
Yes, can confirm this is causing a link error like:
|
Well, that is vexing... can you try printing the LLVM target's OSName before and after the snippet here that injects the version information? I wonder if |
This gives LLVM enough information to generate a "platform load-command" in the MachO object file.
Frustratingly, there is not a simple API that sets this directly; it must be passed in the os name.
Fixes #7941