mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not attempt to merge non-fat frameworks in Xcode build (#8251)
* Do not attempt to merge non-fat frameworks in Xcode build During the Xcode build, we strip code irrelevant to the target architecture in frameworks used by the application. In the case of non-fat executables, no stripping occurs, so the frameworks can be used as-is. No merge & replace step is necessary. * fixup! Do not attempt to merge non-fat frameworks in Xcode build
This commit is contained in:
parent
0962dd6a94
commit
36e3260bfe
@ -163,13 +163,15 @@ LipoExecutable() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Merge desired architectures.
|
||||
local merged="${executable}_merged"
|
||||
lipo -output "${merged}" -create "${all_executables[@]}"
|
||||
# Generate a merged binary from the architecture-specific executables.
|
||||
# Skip this step for non-fat executables.
|
||||
if [[ ${#all_executables[@]} > 0 ]]; then
|
||||
local merged="${executable}_merged"
|
||||
lipo -output "${merged}" -create "${all_executables[@]}"
|
||||
|
||||
# Replace the original executable with the thinned one and clean up.
|
||||
cp -f -- "${merged}" "${executable}" > /dev/null
|
||||
rm -f -- "${merged}" "${all_executables[@]}"
|
||||
cp -f -- "${merged}" "${executable}" > /dev/null
|
||||
rm -f -- "${merged}" "${all_executables[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Destructively thins the specified framework to include only the specified
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user