diff --git a/common.gypi b/common.gypi index 73695cac679..5586cbce856 100644 --- a/common.gypi +++ b/common.gypi @@ -44,7 +44,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.7', + 'v8_embedder_string': '-node.8', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8config.h b/deps/v8/include/v8config.h index b36169f1f77..b7aeeade6b8 100644 --- a/deps/v8/include/v8config.h +++ b/deps/v8/include/v8config.h @@ -354,6 +354,7 @@ path. Add it with -I to the command line // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported // V8_HAS_DECLSPEC_SELECTANY - __declspec(selectany) supported // V8_HAS___FORCEINLINE - __forceinline supported +// V8_HAS_WARNING(WARNING) - whether WARNING is supported // // Note that testing for compilers and/or features must be done using #if // not #ifdef. For example, to test for Intel C++ Compiler, use: @@ -367,6 +368,12 @@ path. Add it with -I to the command line #define V8_HAS_CPP_ATTRIBUTE(FEATURE) 0 #endif +#if defined(__has_warning) +#define V8_HAS_WARNING(WARNING) __has_warning(WARNING) +#else +#define V8_HAS_WARNING(WARNING) 0 +#endif + #if defined(__clang__) #if defined(__GNUC__) // Clang in gcc mode. diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h index c2c24e8229a..5b1619f9ef0 100644 --- a/deps/v8/src/base/macros.h +++ b/deps/v8/src/base/macros.h @@ -668,8 +668,7 @@ static_assert(V8_ENABLE_SIMD128); #endif // defined(__clang__) // Disable/enable -Wlifetime-safety warnings in code. -#if defined(__clang__) && defined(__has_warning) && \ - __has_warning("-Wlifetime-safety") +#if V8_HAS_WARNING("-Wlifetime-safety") #define START_IGNORE_LIFETIME_SAFETY_WARNINGS() \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wlifetime-safety\"") @@ -677,11 +676,10 @@ static_assert(V8_ENABLE_SIMD128); #else #define START_IGNORE_LIFETIME_SAFETY_WARNINGS() #define END_IGNORE_LIFETIME_SAFETY_WARNINGS() -#endif // defined(__clang__) +#endif // V8_HAS_WARNING("-Wlifetime-safety") // Disable/enable -Wreturn-stack-address warnings in code. -#if defined(__clang__) && defined(__has_warning) && \ - __has_warning("-Wreturn-stack-address") +#if V8_HAS_WARNING("-Wreturn-stack-address") #define START_IGNORE_RETURN_STACK_ADDRESS_WARNINGS() \ _Pragma("clang diagnostic push") \ _Pragma("clang diagnostic ignored \"-Wreturn-stack-address\"") @@ -690,6 +688,6 @@ static_assert(V8_ENABLE_SIMD128); #else #define START_IGNORE_RETURN_STACK_ADDRESS_WARNINGS() #define END_IGNORE_RETURN_STACK_ADDRESS_WARNINGS() -#endif // defined(__clang__) +#endif // V8_HAS_WARNING("-Wreturn-stack-address") #endif // V8_BASE_MACROS_H_