-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix bad dSYM for symbol-stripped dynamic framework builds #6531
Conversation
@friedbunny, thanks for your PR! By analyzing this pull request, we identified @1ec5, @incanus and @boundsj to be potential reviewers. |
Fixes the issue where our stripped dynamic build did not have a valid dSYM. Disabling GCC_GENERATE_DEBUGGING_SYMBOLS for SYMBOLS=NO builds meant that those builds had no debug symbols to strip or add to a dSYM.
9a898db
to
5ce9ab1
Compare
One other thing: the Now that we are invoking The dSYM size is also much smaller: 234MB vs 32MB. This worries me and I’m not sure why it’s happened, but I was able to successfully symbolicate crashes with this smaller dSYM... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catches all around, and validating the dSYM as part of the build process is a great idea. Would be nice if we can extend validation to macOS, but if that’s nontrivial, it wouldn’t block this PR.
@@ -43,7 +42,7 @@ if [[ -e ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework.dSYM ]]; then | |||
cp -r ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework.dSYM "${OUTPUT}" | |||
fi | |||
|
|||
if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then | |||
if [[ ${SYMBOLS} = NO ]]; then | |||
step "Stripping binaries…" | |||
strip -Sx "${OUTPUT}/${NAME}.framework/${NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to do dSYM validation for macOS as well? I think it might’ve caught #5818 indirectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be as easy as copying it over, I think. Will give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this in 6723a61.
5ce9ab1
to
a8e15e8
Compare
Should be ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
Oh, this is probably worth mentioning in the iOS changelog too. |
672c1ce
to
8971788
Compare
Fixes #6502. Stripped dynamic framework packages should now come with the correct dSYM.
Disabling
GCC_GENERATE_DEBUGGING_SYMBOLS
forSYMBOLS=NO
builds meant that those builds had no debug symbols to strip or add to a dSYM. Runningmake iframework SYMBOLS=NO
would fail to create a dSYM, but our deploy script would evidently reuse the symbol-ful dSYM.With the added UUID validation, the above scenario would now fail:
Note:
GCC_GENERATE_DEBUGGING_SYMBOLS=YES
is the default setting.Useful resources
nm Mapbox.framework/Mapbox | grep MGL
helped test symbol stripping./cc @boundsj @1ec5