• Max Moroz's avatar
    Build: disable ICF when using clang_code_coverage=true. · 928c2b5c
    Max Moroz authored
    When ICF (Identical Code Folding) is enabled, the linker has hard time figuring
    out all identical code patterns inserted by compiler's instrumentation. That is
    why this option is disabled when we use sanitizers. It also should be disabled
    for code coverage instrumented build, as it has even more instrumentation code.
    
    This change allows code coverage bots to use use_sanitizer_coverage=false which
    would result in much faster and much smaller builds.
    
    Performance improvements:
    - builds 2x faster
    - binaries 2x smaller
    - run time 2x smaller (or even more on some targets, up to 6x)
    
    Bug: 851337
    Change-Id: I20d4ad1e55730daf813e0f26060dd5830351dbcf
    Reviewed-on: https://chromium-review.googlesource.com/1112199
    Commit-Queue: Max Moroz <mmoroz@chromium.org>
    Reviewed-by: default avatarAbhishek Arya <inferno@chromium.org>
    Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569693}
    928c2b5c
BUILD.gn 77.4 KB