• dslomov@chromium.org's avatar
    Revamp v8_optimized_debug options · d0e0ff01
    dslomov@chromium.org authored
    This patch changes the definition of v8_optimized_debug==1 to match the release-mode compiler optimization settings (generally, going from -O1 to -O3 on Linux, similar switches for Mac/Win). This produces a minor speed up on Linux, but significant speedups on Mac and Win. This may make it much harder to debug, though.
    
    It also adds a v8_optimized_debug==2 that, in addition to the compiler optimizations, undef's DEBUG and defines DEBUG. This leaves V8_ENABLE_CHECKS alone (so that the assertions are still enabled), but otherwise basically matches a release mode build.
    
    Builds with v8_optimized_debug==2 roughly match a Release mode build for speed; the V8_ENABLE_CHECKS checks appear to have minimal performance impact (maybe 5-10%, unlike what was previously thought). In addition, switching from the previous optimization settings makes a significant improvement on Mac and Win (50% or more), and switching from DEBUG to NDEBUG makes a significant improvement (another 50% or more).
    
    Note that using v8_optimized_debug==2 may also cause some v8 tests to fail. This is currently is believed to be acceptable.
    
    R=machenbach@chromium.org
    BUG=254188
    
    Review URL: https://codereview.chromium.org/19384011
    
    Patch from Dirk Pranke <dpranke@chromium.org>.
    
    git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
    d0e0ff01
toolchain.gypi 23.3 KB