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
Currently when you build for an application extension rules_apple (or rules_swift) don't pass -fapplication_extension or -application_extension to the compiler. This is passed to the linker to create the final application extension binary but I assume based on the ld manpage that this just validates dynamic libraries being used, and not the limited API set (for example some API from UIKit are valid, but some like UIApplication are not).
In the case of shared transitive dependencies between applications and their extensions, Xcode always passes these arguments and uses the same build artifact for both final binaries. I think that case is ideal (as opposed to building them twice similar to #319).
The text was updated successfully, but these errors were encountered:
Yea, on the linker side it just sets a flag, the compiler needs the flag to change the warnings/error during compilation.
We've had some discussions internally about this and the problem is avoiding the double build; so it currently isn't passed.
Slight aside - Xcode doesn't always use the same artifacts, it all depends on how you set thing up. If you put sources/dependencies directly into your extension and app targets, they are compiled twice with the differing flags. When you use a framework and mark it for extension safe, then it can generate the warnings/errors and both the app and extension(s) can link against the framework with the App being able to call apis tagged as not extension safe while the extension can't call those apis.
Currently when you build for an application extension rules_apple (or rules_swift) don't pass
-fapplication_extension
or-application_extension
to the compiler. This is passed to the linker to create the final application extension binary but I assume based on theld
manpage that this just validates dynamic libraries being used, and not the limited API set (for example some API from UIKit are valid, but some like UIApplication are not).In the case of shared transitive dependencies between applications and their extensions, Xcode always passes these arguments and uses the same build artifact for both final binaries. I think that case is ideal (as opposed to building them twice similar to #319).
The text was updated successfully, but these errors were encountered: