Fix MSVC C++17 build config

MSVC doesn't define __cplusplus appropriately, so use _MSVC_LANG instead.

Bug: chromium:1274247
Change-Id: I40ef9f42f4e55b3410f89ff23c228f1b1201c4ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308423
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Adam Klein <adamk@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78180}
This commit is contained in:
Adam Klein 2021-11-30 14:19:53 -08:00 committed by V8 LUCI CQ
parent a858cfd3ec
commit 138605e631

View File

@ -594,7 +594,7 @@ V8 shared library set USING_V8_SHARED.
// From C++17 onwards, static constexpr member variables are defined to be
// "inline", and adding a separate definition for them can trigger deprecation
// warnings. For C++14 and below, however, these definitions are required.
#if __cplusplus < 201703L
#if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
#define V8_STATIC_CONSTEXPR_VARIABLES_NEED_DEFINITIONS
#endif