Skip to content

Commit 0a9e556

Browse files
committed
deps: fix V8 compilation on GCC 12
1 parent 66b76e2 commit 0a9e556

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

deps/v8/src/base/macros.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,17 @@ namespace base {
173173
// base::is_trivially_copyable will differ for these cases.
174174
template <typename T>
175175
struct is_trivially_copyable {
176-
#if V8_CC_MSVC
176+
#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ == 2)
177177
// Unfortunately, MSVC 2015 is broken in that std::is_trivially_copyable can
178178
// be false even though it should be true according to the standard.
179179
// (status at 2018-02-26, observed on the msvc waterfall bot).
180180
// Interestingly, the lower-level primitives used below are working as
181181
// intended, so we reimplement this according to the standard.
182182
// See also https://developercommunity.visualstudio.com/content/problem/
183183
// 170883/msvc-type-traits-stdis-trivial-is-bugged.html.
184+
//
185+
// GCC 12.2 is broken too, so the same polyfill is used.
186+
// See: https://github.com/nodejs/node/pull/45427
184187
static constexpr bool value =
185188
// Copy constructor is trivial or deleted.
186189
(std::is_trivially_copy_constructible<T>::value ||

0 commit comments

Comments
 (0)