fix: building node modules with Visual Studio 2017 (#34217)

This commit is contained in:
Milan Burda 2022-05-23 13:04:08 +02:00 committed by GitHub
parent aa3e852a73
commit 291eb60916
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ Subject: fix: usage of c++ [[deprecated]] attribute for older msvc versions
This attribute can only be used in all contexts in Visual Studio 2019 This attribute can only be used in all contexts in Visual Studio 2019
diff --git a/include/v8config.h b/include/v8config.h diff --git a/include/v8config.h b/include/v8config.h
index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef74c2ab57 100644 index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..644f921f970d214b4d93b1e4c384e7475740b485 100644
--- a/include/v8config.h --- a/include/v8config.h
+++ b/include/v8config.h +++ b/include/v8config.h
@@ -454,10 +454,13 @@ path. Add it with -I<path> to the command line @@ -454,10 +454,13 @@ path. Add it with -I<path> to the command line
@ -25,7 +25,7 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef
#else #else
# define V8_DEPRECATED(message) # define V8_DEPRECATED(message)
#endif #endif
@@ -465,7 +468,11 @@ path. Add it with -I<path> to the command line @@ -465,13 +468,17 @@ path. Add it with -I<path> to the command line
// A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated.
#if defined(V8_IMMINENT_DEPRECATION_WARNINGS) #if defined(V8_IMMINENT_DEPRECATION_WARNINGS)
@ -38,3 +38,10 @@ index 77fd65c6c5b7d8c0a7fe7a37c40e17ce66f49ce6..d203053d41c702733f5f3b950aa31cef
#else #else
# define V8_DEPRECATE_SOON(message) # define V8_DEPRECATE_SOON(message)
#endif #endif
-#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6)
+#if !defined(__clang__) && (defined(__GNUC__) && __GNUC__ < 6) || (defined(_MSC_VER) && _MSC_VER < 1920)
# define V8_ENUM_DEPRECATED(message)
# define V8_ENUM_DEPRECATE_SOON(message)
#else