Repository navigation
Use dwarf debug info for Debug builds, as Xcode's project template does - #265
Open
Dharin-shah wants to merge 1 commit into
Open
Dharin-shah wants to merge 1 commit into
Dharin-shah wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The template's project doesn't set
DEBUG_INFORMATION_FORMAT, so Debug picks updwarf-with-dsymfrom the iOS and iOS Simulator platform defaults, and every Debug build that relinks the app runsdsymutiloverHelloWorld.debug.dylibnear the end, mostly on its own. Xcode's own new-project template setsdwarffor Debug anddwarf-with-dsymfor Release, and this does the same at the project level. Both values give clang and swiftc the same-g, so the object files don't change and lldb still finds the debug info through them; a Debug build just stops writing a.dSYM. Release doesn't change.I measured it on a React Native 0.87.1 app with 114 pods and the core built from source, Simulator Debug on an M5 Pro with Xcode 27.2, three interleaved pairs of a build into a fresh DerivedData and three of a clean build. In each default build
GenerateDSYMFiletook 6.7 to 8.6 s of task time, 4.0 to 6.2 s of it with nothing else running, and it ran in none of thedwarfones. The whole builds are noisier: the fresh ones went from 55.6 to 44.5 s (medians) and the clean ones from 45.8 to 40.3 s, but one pair of three went the other way in each, so I'd go by the dSYM seconds. Hmm, one more thing: those builds had Xcode's compilation cache on with a warm store, so in the fresh-DerivedData builds all 3,521 cacheable tasks were cache hits, and the dSYM step is a much bigger share of them than of a normal build. I haven't timed an uncached build, or one with the prebuilt core, wheredsymutilhas less to read.I saw #244 got moved into React Native's scripts instead. If you'd rather have this one there too, I think it's one
set_build_setting(..., config_name: "Debug")line next to theSWIFT_ACTIVE_COMPILATION_CONDITIONSone inreact_native_post_install, happy to move it 🙂Changelog:
[IOS] [CHANGED] - Debug builds use
DEBUG_INFORMATION_FORMAT = dwarfand no longer generate a dSYMTest Plan:
xcodebuild -project template/ios/HelloWorld.xcodeproj -target HelloWorld -configuration Debug -sdk iphonesimulator -showBuildSettings | grep ' DEBUG_INFORMATION_FORMAT 'before and after this change:Debug, before: DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
Debug, after: DEBUG_INFORMATION_FORMAT = dwarf
Release, before and after: DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
The same with
-sdk iphoneos.