bazelbuild / bazelbuild/rules_apple

ios_sticker_pack_extension stub binary architectures aren't stripped, causing DynamicFrameworkSlicer not to remove extra architectures

Open
#704 4 comments 1 reaction 0 assignees View on GitHub
P3
Dominant language
Starlark
Stars
593
Forks
334
Avg merge
16h 48m
Merged PRs (30d)
9

Description

The stub binary used for `ios_sticker_pack_extension` in Xcode 11.3 has `armv7`, `armv7s`, and `arm64` architectures slices. When building with `--ios_multi_cpus=arm64` the application binary correctly only has an `arm64` architecture slices, but since `DynamicFrameworkSlicer` takes into account all extension binaries when deciding which architecture slices to keep, resulting in `armv7` and `armv7s` slices sticking around.

Ideally the stub binary would have its architectures slices stripped, resulting in both a smaller stub and smaller frameworks.

Regardless if that is possible `DynamicFrameworkSlicer` should exclude sticker pack binaries in its decision since they don't link against the dynamic frameworks.

Contributor guide

Open the contributing guide

Research direction

Start by tracing DynamicFrameworkSlicer and the ios_sticker_pack_extension stub binary produced with Xcode 11.3. Reproduce an --ios_multi_cpus=arm64 build and inspect which architectures are retained in the application and dynamic frameworks. Done means the unwanted armv7 and armv7s slices no longer remain, either through stub handling or exclusion from the slicer's decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.