bazelbuild / bazelbuild/rules_apple
Pass -fapplication_extension to modules
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
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](https://github.com/bazelbuild/rules_apple//blob/c6a349b5bad054314749c28915086836e57f43fa/apple/ios.bzl#L489) 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 https://github.com/bazelbuild/rules_apple/issues/319).
Contributor guide
Assessment
This issue has not been assessed yet.