Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve dSYM handling for XCFrameworks #9540

Merged
merged 1 commit into from Feb 18, 2020
Merged

Conversation

amorde
Copy link
Member

@amorde amorde commented Feb 17, 2020

Changes:

  • Ensure all dSYMs are archived, not only files that match the naming scheme of framework slices
  • Correctly handle dSYM files that do not have the extension .framework.dSYM
  • Ensure dSYMS are stored in the correct directory when archiving

Closes #9530
Requires CocoaPods/cocoapods-integration-specs#268

amorde added a commit to CocoaPods/cocoapods-integration-specs that referenced this pull request Feb 17, 2020
else
# The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing.
touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the expected format for vendored frameworks, but since xcframeworks will have many dSYM files they must be named differently

# Get architectures for current target binary
binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)"
# Intersect them with the architectures we are building for
intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\\n' | sort | uniq -d)"
# If there are no archs supported by this binary then warn the user
if [[ -z "$intersected_archs" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
if [[ "$warn_missing_arch" == "true" ]]; then
echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)."
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for xcframeworks, it's possible for a dSYM to be excluded completely due to archs not matching. this isn't an error, since there are multiple dSYMs instead of 1


local target_dsym=""
for i in ${!dsyms[@]}; do
install_artifact "$dsym_folder/${dsyms[$i]}" "$CONFIGURATION_BUILD_DIR" "true"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the prepare step, we now copy all dsyms and filter out the ones we need inside the Embed Frameworks script

@amorde amorde changed the base branch from master to 1-9-stable February 17, 2020 04:29
@amorde amorde requested a review from dnkoutso February 17, 2020 04:30
@dnkoutso dnkoutso added this to the 1.9.0 milestone Feb 17, 2020
amorde added a commit to CocoaPods/cocoapods-integration-specs that referenced this pull request Feb 17, 2020
Changes:
- Ensure all dSYMs are archived, not only files that match the naming scheme of framework slices
- Correctly handle dSYM files that do not have the extension `.framework.dSYM`
- Ensure dSYMS are stored in the correct directory when archiving
@amorde amorde merged commit 5204dab into 1-9-stable Feb 18, 2020
@amorde amorde deleted the amorde/xcframework-dsyms branch February 18, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for dSYMs when using XCFrameworks in CocoaPods 1.9.0.beta.x
2 participants