hhvm
hhvm copied to clipboard
Enable folly::Symbolizer for debug symbols
This PR enables folly::Symbolizer in HHVM, in order to have debug symbols (in stacktraces, perf, GDB) when huge pages are enabled (default behavior for open source builds). This feature can be turned off by setting the CMake option ENABLE_FOLLY_SYMBOLIZER to OFF.
Also, one nice side-effect is that this change causes HHVM to show symbols in backtraces (after a crash) for non-huge-pages builds, which were missing for some reason.
It also fixes an issue with the build system, by creating a new cmake file that initializes the OS variables and including it before Options.cmake, where these variables are used. More specifically, MAP_TEXT_HUGE_PAGES and ENABLE_FOLLY_SYMBOLIZER are set depending on the value of the LINUX variable, which is only set in HPHPCompiler.cmake, included later. This causes these 2 variables not to be visible in third-party modules the first time configure is run (subsequent times the variables are taken from the cmake cache).
This PR depends on https://github.com/hhvm/hhvm-third-party/pull/123.