Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explicit option to build Apple dSYM (facebook#296)
Summary: Add `HERMES_BUILD_APPLE_DSYM` option 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. Pull Request resolved: facebook#296 Test Plan: ### Build ```bash ./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_release ``` ### Install without stripping ```bash cmake --build ./build_release --target install nm -a destroot_release/bin/hermesc | wc -l 27943 ``` ### Install with stripping ```bash cmake --build ./build_release --target install/strip nm -a destroot_release/bin/hermesc | wc -l 250 ``` …and dSYM DWARF metadata is maintained: ```bash 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} ``` Reviewed By: tmikov Differential Revision: D22576263 Pulled By: willholen fbshipit-source-id: 2bda49e638d145ba5d029e77069d6adcc0b1dd8c
- Loading branch information