bazelbuild / bazelbuild/rules_apple

Pass -fapplication_extension to modules

Open
#321 2 comments 0 reactions 0 assignees View on GitHub
P3 type: bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.