rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

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

Open brentleyjones opened this issue 4 years ago • 4 comments

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.

brentleyjones avatar Feb 12 '20 16:02 brentleyjones

We've recently run into this again on another app of ours. Do y'all agree that we should strip this binary as well?

brentleyjones avatar Oct 27 '20 17:10 brentleyjones

++

keith avatar Oct 27 '20 17:10 keith

We'll look into a fix and open a PR

brentleyjones avatar Oct 27 '20 17:10 brentleyjones

Looking into this more, we won't strip the stub, but we will enhance the framework importer to ignore the stubs (since they won't use the frameworks anyway).

brentleyjones avatar Oct 27 '20 19:10 brentleyjones