-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Description
Code hooks are invoked for a single architecture and single OS.
And in Flutter for MacOS and iOS we combine the thin binaries into fat binaries.
However, it might be that the user already has a fat binary.
We should consider adding support for reporting fat binaries. We have hypothesized this before:
- If we want to ever add support for fat binaries, we'd probably want to add that as a
MultiArchCodeAsset
with aMultiArchCodeConfig
- Which would have multiple architectures in the config.
- The
multi_architecture_code_asset
should be listed- Must the output contain all requested architectures? Or only a subset?
- If a subset, then it must be listed in the output.
- It would be a separate hook invocation.
- Open questions:
- How would that work together with the normal code assets? Can these be mixed and matched? Would Flutter for example combine a fat binary with two architectures and and a non-fat-binary with a single architecture if they have the same asset id?
- These
MultiArchitectureCodeAsset
s would likely live in the samepackage:code_assets
such that they can shareOS
,Architecture
and friends.
Originally posted by @dcharkes in #2127
The workaround is to thin the binary from a fat binary in the build hook:
lipo YourFatBinary -extract arm64 -output YourThinBinary_arm64
Related issue: