[cmake] Add explicit option to build Apple dSYM#296
Closed
alloy wants to merge 1 commit intofacebook:masterfrom
Closed
[cmake] Add explicit option to build Apple dSYM#296alloy wants to merge 1 commit intofacebook:masterfrom
alloy wants to merge 1 commit intofacebook:masterfrom
Conversation
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
Add
HERMES_BUILD_APPLE_DSYMoption to build a dSYM bundle for the libhermes target on Apple platforms.This will work with any of the build types and is off by default.
Installing the tools with the install/strip target will ensure all tools and the runtime lib are stripped of debug symbols, but leaving the dSYM bundle in tact.
Test Plan
Build
./src/utils/build/configure.py --distribute --cmake-flags='-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true -DCMAKE_INSTALL_PREFIX:PATH=../destroot_release' build_release cmake --build ./build_releaseInstall without stripping
cmake --build ./build_release --target install nm -a destroot_release/bin/hermesc | wc -l 27943Install with stripping
cmake --build ./build_release --target install/strip nm -a destroot_release/bin/hermesc | wc -l 250…and dSYM DWARF metadata is maintained:
dwarfdump --statistics destroot_release/Library/Frameworks/hermes.framework.dSYM {"version":3,"file":"destroot_release/Library/Frameworks/hermes.framework.dSYM/Contents/Resources/DWARF/hermes","format":"Mach-O 64-bit x86-64","source functions":30305,"source functions with location":30302,"inlined functions":172725,"inlined funcs with abstract origins":172725,"unique source variables":79276,"source variables":353690,"variables with location":232195,"call site entries":186409,"scope bytes total":19161949,"scope bytes covered":10500176,"total function size":1763513,"total inlined function size":998375,"total formal params":300264,"formal params with source location":166067,"formal params with type":300264,"formal params with binary location":200407,"total vars":38809,"vars with source location":38385,"vars with type":38809,"vars with binary location":22161}