Commit 36e3260b authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

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
parent 0962dd6a
...@@ -163,13 +163,15 @@ LipoExecutable() { ...@@ -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"
# Replace the original executable with the thinned one and clean up. lipo -output "${merged}" -create "${all_executables[@]}"
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 # Destructively thins the specified framework to include only the specified
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment