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:
@@ -163,13 +163,15 @@ LipoExecutable() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Merge desired architectures.
|
# Generate a merged binary from the architecture-specific executables.
|
||||||
local merged="${executable}_merged"
|
# Skip this step for non-fat executables.
|
||||||
lipo -output "${merged}" -create "${all_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
|
||||||
cp -f -- "${merged}" "${executable}" > /dev/null
|
rm -f -- "${merged}" "${all_executables[@]}"
|
||||||
rm -f -- "${merged}" "${all_executables[@]}"
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Destructively thins the specified framework to include only the specified
|
# Destructively thins the specified framework to include only the specified
|
||||||
|
|||||||
Reference in New Issue
Block a user