• thakis's avatar
    Set V8_CC_GNU or V8_CC_MSVC for clang in gcc / cl mode. · 643c24eb
    thakis authored
    Also, remove V8_CC_CLANG since it's not read anywhere (and ideally shouldn't
    be).
    
    Clang tries to be compatible with gcc in clang mode, and with msvc in clang-cl
    mode. It wants to go down the same code paths that these compilers want to go
    down in most cases.
    
    For example, V8PRIxPTR was set incorrectly on Windows 64-bit before this change
    since macros.h assumed that checking for V8_CC_MSVC is enough to find LLP64
    systems, but V8_CC_MSVC wasn't set for clang.  Most other existing checks for
    V8_CC_MSVC should be taken for clang-cl too (and for the remaining ones,
    clang-cl is happy with either code path).
    
    Likewise, V8_IMMEDIATE_CRASH is currently set to a suboptimal value with clang
    since __builtin_trap() is only used if V8_CC_GNU is set.
    
    Including clang in the gcc and cl macros is also what chromium does.
    
    BUG=chromium:82385
    LOG=y
    
    Review URL: https://codereview.chromium.org/757553004
    
    Cr-Commit-Position: refs/heads/master@{#25592}
    643c24eb
v8config.h 15.3 KB