-
Notifications
You must be signed in to change notification settings - Fork 981
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
Feature: add Apple Catalyst support (as new os.subsystem) #8264
Conversation
Doesn't It is interesting though to be able to declare architecture tuning levels. |
seems so, but I can't find anything in Apple's reference what does it stand for. only some external sources. |
cpuid.h confirms that:
|
from
no idea why did they bring only Haswell? |
This is probably done to unconditionally make the extra instructions of haswell available. Catalyst is a way to run mobile iOS apps on desktop (https://developer.apple.com/tutorials/mac-catalyst/) Does it need special treatment? |
yes, it needs special treatment (like |
Sorry for my dumb questions because I am no Apple guy. You say you can't mix On Linux, when I compile a library with I can only see |
no idea, that might be an ABI difference that requires to pass arguments via AVX registers, perhaps |
I don't think there are differences in calling conventions between microarchitectures. There might exist some exotic non-standard conventions, but those are non-standard and can be ignored. |
Hi, I made in the past some changes into my conan darwin toolchain version 1.1.0 to support it. It works and run OK on macOS my iPad apps. I removed it after Apple launch support for all iOS apps on mac with arm processor. Here are the changes: Basically you need use:
Where "darwin_arch" = "x86_64" and "miphoneos-version-min" = "13.0". Example:
But to it work well you need generate a xcframework, because if you use a flat binary you will have a conflict between x86_64 for mac and x86_64 for catalyst. Thanks. |
@theodelrieu for me it's currently not that clear how to model Catalyst with conan settings appropriately. e.g. should it be new |
@prsolucoes unfortunately, I don't have any experience with XCFrameworks yet. do they require special treatment, or do they work just regular
|
Hi @SSE4 You can use on Apple XCFrameworks as frameworks. Internally xcframework is a group or framework by platform. To generate you can use:
Result: |
I think adding an extra arch is not a good idea. This arch is going to be badly supported on cci, and other recipes. I think this needs to be a |
Ok, thanks for the feedback. Then I probably didn't completely understood the thread above, I deduced from it that it could be added. Please @SSE4 can you elaborate on this? Would the |
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.
Making sure we do the right decision after @madebr feedback suggesting this is not a good approach.
yes, it seems like the sub-system fits better. I'd still like to hear from @theodelrieu and @prsolucoes how do they prefer to have it modeled in settings. |
Hi @SSE4, What os.subsystem mean? What it will do in real world? How os.subsystem will affect compiler params? You need something to change two settings for cflags and cxxflags:
|
you're right, under the hood, inside the conan client, it will be:
I am more concerned with user experience now. e.g. catalyst might be an top-level anyway, we need to somehow distinguish Catalyst from the regular Macos/iOS, and we need to express it with conan settings somehow as well. |
Humm, now im understand how you organize it under the code. I think that "catalyst" is a subsystem, because it still x86_64, so it "only run on macos" and not ios. It don't work on iOS, but use something from this only to build things related to UI (uikit). So "catalyst" is a subsystem for macos that use special flags to build a desktop app with ios things, but still related to macos. You can see here the words of apple:
It still a "native mac app". It can "share" swift code with iOS when you create a iOS app. Mac catalyst "access" ios framework, but still a mac app. Based on all this, in my opinion, it is a subset of macos normal app. |
@SSE4 You can use the x86_64-apple-ios13.0-macabi target only |
okay, so the plan is:
I'll wait for the #8263 and update this one (otherwise they will conflict) |
You need set the min version. Options:
Or i think that we can set only What will be the behaviour? |
the min-version is already set for all other Apple platforms if |
ok |
But here is no dependence between macOS (os.version) version and iOS version (-miphoneos-version-min = 13.0). PS: yes, x86_64h arch is not required for Catalyst. |
a01ea83
to
fcc2dd1
Compare
rebased on top of #8263 :
|
fcc2dd1
to
6e9908b
Compare
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.
Looking good, needs to merge develop and solve conflicts now that the os.sdk PR has been merged.
Signed-off-by: SSE4 <[email protected]>
99f7ede
to
597e6f7
Compare
Signed-off-by: SSE4 <[email protected]>
597e6f7
to
ff7de2e
Compare
@memsharded rebased |
closes: #6259
on top of #8263 !
/cc @theodelrieu @prsolucoes
Changelog: Feature: Add Apple Catalyst support (as new os.subsystem)
Docs: conan-io/docs#1983
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.