• Xiaohan Wang's avatar
    base: Add ENABLE_LOG_ERROR_NOT_REACHED buildflag · 3553b590
    Xiaohan Wang authored
    Currently NOTREACHED() uses LogErrorNotReached() on ChromeOS for release
    builds, and DCHECK(false) otherwise. However, there are other projects
    depending on Chromium that would prefer using DCHECK(false) in all cases,
    and currently there's no easy way to do so.
    
    This CL adds an |enable_log_error_not_reached| gn arg to control whether
    to use LogErrorNotReached() for NOTREACHED() to solve this problem. It
    is enabled by default only for ChromeOS release builds to keep the
    current behavior.
    
    Bug: 760393
    Change-Id: I512227563d8ad4a08a8d7b5d1ec966a8aacbcc08
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1586593Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#655701}
    3553b590
logging.gni 356 Bytes