0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-23 18:57:48 +01:00
Commit Graph

992 Commits

Author SHA1 Message Date
Chengzhong Wu
f630fde68b deps: V8: cherry-pick f915fa4c9f41
Original commit message:

    [osr] Ensure trying to osr does not skip loop interrupts

    Fixed: 374013413
    Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5946288
    Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Olivier Flückiger <olivf@chromium.org>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96708}

Refs: f915fa4c9f
PR-URL: https://github.com/nodejs/node/pull/55484
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-23 13:11:06 +00:00
Yagiz Nizipli
fe45be207b
deps: V8: backport 0d5d6e71bbb0
Original commit message:

    Remove `--js-promise-withresolvers` runtime flag

    Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Bug: 42204122
    Change-Id: I017a0d1ae0f8225513206ffb7806a4250be75d4c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5843972
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96215}

Refs: 0d5d6e71bb
PR-URL: https://github.com/nodejs/node/pull/55115
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-10-03 17:22:10 +02:00
Michaël Zasso
6e150f9527 deps: V8: cherry-pick 97199f686e2f
Original commit message:

    aix: add work around for f16 type

    AIX builds started to fail after this commit d057564707.

    Change-Id: I25a5c4ae3b4fe5c27a9fb9e35e2bcd2bbed40351
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5789180
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95952}

Refs: 97199f686e
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:42 +00:00
Michaël Zasso
1e16779fa1 deps: V8: cherry-pick 01a47f3ffff2
Original commit message:

    [cfi] Add missing 'typename' in SegmentedTable

    Makes the code more consistent and fixes compilation on older Clang
    versions.

    Change-Id: I82abebd500e6651ac5c5b180cd7b49b4f20e8299
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5805956
    Reviewed-by: Samuel Groß <saelo@chromium.org>
    Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
    Reviewed-by: Stephen Röttger <sroettger@google.com>
    Cr-Commit-Position: refs/heads/main@{#95809}

Refs: 01a47f3fff
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:41 +00:00
Michaël Zasso
762a440e68 deps: patch V8 to support older Clang versions
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:40 +00:00
Michaël Zasso
95f2213eed deps: always define V8_NODISCARD as no-op
It's causing compiler errors with some classes on Xcode 11
and the attribute should have no runtime effect.

PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-19 14:25:40 +00:00
Stefan Stojanovic
09d997f181 deps: fix FP16 bitcasts.h
PR-URL: https://github.com/nodejs/node/pull/53134
Refs: https://github.com/nodejs/node/issues/52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:39 +00:00
StefanStojanovic
1866363854 deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:39 +00:00
Michaël Zasso
6f4f22f84c deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-09-19 14:25:38 +00:00
Michaël Zasso
dfff61475e deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-09-19 14:25:37 +00:00
Michaël Zasso
69ad89f8eb deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-09-19 14:25:37 +00:00
Michaël Zasso
f68d7d2acc build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/54536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-09-19 14:25:36 +00:00
Michaël Zasso
6bce6f69c6 Revert "deps: remove bogus V8 DCHECK"
This reverts commit fba06eb34a.

PR-URL: https://github.com/nodejs/node/pull/54682
Refs: https://github.com/v8/v8/compare/12.8.374.22...12.8.374.31
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-11 07:14:27 +00:00
Joyee Cheung
54e20c1c94 deps: V8: cherry-pick e74d0f437fcd
Original commit message:

    [api] add v8::Isolate::GetDefaultLocale()

    This allows embedders to query the default locale used by Intl
    APIs.

    This information is already available to user land via
    Intl?.Collator().resolvedOptions().locale, the issue with this
    is that it's a lot slower and requires dynamic access to Intl
    API, which is subject to patching and prototype pollution so it's
    not as reliable for embedders than having a V8 API to query
    the default locale directly.

    Refs: https://github.com/nodejs/node/pull/54279
    Change-Id: I5a1823993c9ae79f8f61f54c6464daf882a09ba3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5772938
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#95678}

Refs: e74d0f437f
PR-URL: https://github.com/nodejs/node/pull/54279
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-08-29 03:25:50 +00:00
Michaël Zasso
fba06eb34a
deps: remove bogus V8 DCHECK
Refs: https://github.com/nodejs/node/pull/54077#issuecomment-2283753739
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:16 +02:00
Michaël Zasso
5355603fb5
deps: V8: cherry-pick 00e9eeb3fb2c
Original commit message:

    [base] include <vector> when std::vector is used

    It otherwise doesn't compile on Apple Clang 13.

    See https://github.com/nodejs/node/pull/54077

    Change-Id: I5dd41d98574f461ff7cf6d7d6ce5c71e240ad884
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5771451
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95557}

Refs: 00e9eeb3fb
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:13 +02:00
Michaël Zasso
bcc1e2716c
deps: V8: cherry-pick b1397772c70c
Original commit message:

    Use std::conditional_t for dependent types

    It otherwise doesn't compile on Apple Clang 14

    Change-Id: I8b2f4bfdc25557fab568456f669c440fb4e31d29
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5771471
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95556}

Refs: b1397772c7
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:12 +02:00
Joyee Cheung
415bc750a5
deps: V8: cherry-pick 35888fee7bba
Original commit message:

    [base] fix builds with GCC 12 on certain Linux distributions

    With GCC 12 on certain Linux distributions (at least Debian 12,
    Alpine 3.18, Fedora 37, that ships GCC 12.2),
    std::is_trivially_copyable is broken
    and as a result, V8 fails to compile. This patch uses the
    same polyfill on MSVC to make it compile with GCC 12.2.

    See https://github.com/nodejs/node/pull/45427 for more context.
    Refs: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aeba3e009b0abfccaf01797556445dbf891cc8dc

    Change-Id: Ie0ab1bb1ec105bacbd80b341adf7dbd8569f031f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5679182
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95181}

Refs: 35888fee7b
PR-URL: https://github.com/nodejs/node/pull/53728
Refs: https://github.com/nodejs/node/pull/45427
Refs: https://github.com/nodejs/help/issues/4406
Refs: https://github.com/nodejs/node/issues/53633
Refs: https://github.com/nodejs/help/issues/4430
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:09 +02:00
Michaël Zasso
28f3e5c9d1
deps: always define V8_NODISCARD as no-op
It's causing compiler errors with some classes on Xcode 11
and the attribute should have no runtime effect.

PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:04 +02:00
Stefan Stojanovic
a41c381cde
deps: fix FP16 bitcasts.h
PR-URL: https://github.com/nodejs/node/pull/53134
Refs: https://github.com/nodejs/node/issues/52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:04:01 +02:00
Michaël Zasso
16c9348e60
deps: V8: revert CL 5331688
On Windows debug builds, it is not allowed to dereference empty
iterators.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5331688
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:55 +02:00
StefanStojanovic
dc4e702a45
deps: patch V8 to support compilation with MSVC
After enabling -std:c++20 on Windows, patch is now much smaller.

PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:51 +02:00
Michaël Zasso
f626acc328
deps: silence internal V8 deprecation warning
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:45 +02:00
Michaël Zasso
ed187faa64
deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:30 +02:00
Michaël Zasso
ed029bded7
deps: avoid compilation error with ASan
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14221
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:27 +02:00
Michaël Zasso
e600de93cf
deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:21 +02:00
Michaël Zasso
cc36db7c06
deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:17 +02:00
Michaël Zasso
1dfa3b8255
build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:04 +02:00
Michaël Zasso
2573f74b0d
build: always disable strict aliasing
V8 relies on it.

PR-URL: https://github.com/nodejs/node/pull/54339
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-08-14 18:33:43 +00:00
Joyee Cheung
8027a7be93
deps: V8: cherry-pick 35888fee7bba
Original commit message:

    [base] fix builds with GCC 12 on certain Linux distributions

    With GCC 12 on certain Linux distributions (at least Debian 12,
    Alpine 3.18, Fedora 37, that ships GCC 12.2),
    std::is_trivially_copyable is broken
    and as a result, V8 fails to compile. This patch uses the
    same polyfill on MSVC to make it compile with GCC 12.2.

    See https://github.com/nodejs/node/pull/45427 for more context.
    Refs: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aeba3e009b0abfccaf01797556445dbf891cc8dc

    Change-Id: Ie0ab1bb1ec105bacbd80b341adf7dbd8569f031f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5679182
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95181}

Refs: 35888fee7b
PR-URL: https://github.com/nodejs/node/pull/53728
Refs: https://github.com/nodejs/node/pull/45427
Refs: https://github.com/nodejs/help/issues/4406
Refs: https://github.com/nodejs/node/issues/53633
Refs: https://github.com/nodejs/help/issues/4430
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-25 10:08:09 +00:00
Shelley Vohr
3b16d4c0ad
build: ensure v8_pointer_compression_sandbox is enabled on 64bit
PR-URL: https://github.com/nodejs/node/pull/53884
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-07-24 10:00:07 +00:00
Michaël Zasso
1c1c9bf33a
deps: V8: cherry-pick 9812cb486e2b
Original commit message:

    [api] Remove template id from Local constructor

    According to GCC version 14, this is deprecated in C++20.

    Change-Id: Iaab14c2db56b3787e391e4d50a9099015169d63f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5713754
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Auto-Submit: Michaël Zasso <mic.besace@gmail.com>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#95084}

Refs: 9812cb486e
PR-URL: https://github.com/nodejs/node/pull/53966
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2024-07-22 09:53:44 +00:00
Joyee Cheung
d15f514077 deps: V8: cherry-pick e061cf9970d9
Original commit message:

    [arraybuffers] initialize max byte length of empty array buffers

    Without initializing the max byte length field, any empty array
    buffer captured in the snapshot can make the snapshot unreproducible.

    Refs: https://github.com/nodejs/node/issues/53579

    Change-Id: I2489ab2e57ecbb405ec431a87d0acc92822b777c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5662576
    Reviewed-by: Marja Hölttä <marja@chromium.org>
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#94754}

Refs: e061cf9970
PR-URL: https://github.com/nodejs/node/pull/53755
Fixes: https://github.com/nodejs/node/issues/53579
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2024-07-09 18:34:00 +00:00
Richard Lau
f1db8168cd
build: add version-specific library path for AIX
Add the version-specific directory containing the C/C++ runtime
libraries to `-blibpath` on AIX. This will help link `node` against
the correct libraries at run-time when compiled with a different
version of the GNU C/C++ compiler without having to manually set
a `LIBPATH` environment variable.

PR-URL: https://github.com/nodejs/node/pull/53585
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2024-06-27 16:28:45 +00:00
Joyee Cheung
8e33f20a64
Revert "deps: V8: cherry-pick 9ebca66a5740"
Reason for revert: broke test-snapshot-reproducible.js in
dynamically linked builds in the CI.

This reverts commit 4c730aed7f.

PR-URL: https://github.com/nodejs/node/pull/53582
Refs: https://github.com/nodejs/node/issues/53579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2024-06-25 16:44:47 +00:00
Chengzhong Wu
4c730aed7f
deps: V8: cherry-pick 9ebca66a5740
Original commit message:

    [rab/gsab] Remove --harmony-rab-gsab (has been on by default for a while)

    Bug: v8:11111
    Change-Id: Ie74e7737f3e2e8730820cf00f1cbc7ae02b515af
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5516580
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#93848}

Refs: 9ebca66a57
PR-URL: https://github.com/nodejs/node/pull/53522
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-23 22:31:33 +00:00
kxxt
3597070ef8 deps: V8: cherry-pick a3cc8522a4c8
Original commit message:

    [riscv] avoid cpu probing in li_ptr

    CPU probing is an expensive thing to do and we should avoid doing it upon every li_ptr call.

    Fixes performance regresion bisected in https://github.com/riscv-forks/electron/issues/1

    Change-Id: Ib5ff89b2a730e08de6735123ae60adeffe811ed8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5612950
    Commit-Queue: Yahan Lu <yahan@iscas.ac.cn>
    Reviewed-by: Yahan Lu <yahan@iscas.ac.cn>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#94349}

Refs: a3cc8522a4
PR-URL: https://github.com/nodejs/node/pull/53412
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-13 05:39:20 +00:00
kxxt
7d90f0638d deps: V8: cherry-pick 6ea594ff7132
Original commit message:

    [riscv] Skip check sv57 when enable pointer compress

    Change-Id: I4332d3849d113af105630c0e20cd2b5e3deb9392
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5430889
    Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#93244}

Refs: 6ea594ff71
PR-URL: https://github.com/nodejs/node/pull/53412
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-06-13 05:39:19 +00:00
Stefan Stojanovic
a320ac6ebd
deps: fix FP16 bitcasts.h
PR-URL: https://github.com/nodejs/node/pull/53134
Refs: https://github.com/nodejs/node/issues/52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-05-28 07:10:52 +00:00
Michaël Zasso
efa63f3d05
build: add option to enable clang-cl on Windows
Most changes are gated by the `clang==1` condition to avoid breaking
MSVC builds.

Select C/C++ language standard with ClCompile options.
This avoids passing the `-std:c++20` flag while compiling C code.
Do it only under clang option to avoid breaking addons until node-gyp
supports the new LanguageStandard options.

Disable precompiled header configuration for now as it doesn't seem to
work with clang-cl.

Disable C++20 warnings emitted by the Visual Studio C++ STL.
They're very noisy and not our responsibility to fix.

Co-authored-by: Daniel Lemire <daniel@lemire.me>
Co-authored-by: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
PR-URL: https://github.com/nodejs/node/pull/52870
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-05-13 19:05:05 +00:00
Michaël Zasso
2b657ccfb3 build: sync V8 warning cflags with BUILD.gn
PR-URL: https://github.com/nodejs/node/pull/52873
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-05-09 12:11:00 +00:00
Michaël Zasso
25c788009f build: harmonize Clang checks
- Set the clang variable in `config.gypi` so it depends on compiler
  checks made by the configure script.
- Replace gyp conditions with `llvm_version` and "0.0" with conditions
  that use the `clang` variable.
- Always use `clang==1` or `clang==0` in gyp conditions

PR-URL: https://github.com/nodejs/node/pull/52873
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-05-09 12:10:59 +00:00
Michaël Zasso
c7e42092f3
build: compile with C++20 support
Closes: https://github.com/nodejs/node/issues/45402
PR-URL: https://github.com/nodejs/node/pull/45427
Fixes: https://github.com/nodejs/node/issues/45402
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2024-05-05 14:44:02 +00:00
Chengzhong Wu
8b2011a818
build: define NOMINMAX in common.gypi
V8 and Node.js had defined `NOMINMAX` on Windows for a long time.  In
recent changes, V8 added `std::numeric_limits::min` usages in its
header files which caused addons without `NOMINMAX` defines failed
to compile.

Define `NOMINMAX` in common.gypi so that addons can be compiled with
the latest V8 header files.

PR-URL: https://github.com/nodejs/node/pull/52794
Fixes: https://github.com/nodejs/nan/issues/968
Refs: https://github.com/nodejs/gyp-next/pull/244
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2024-05-04 13:55:06 +00:00
Richard Lau
9b105bd656
deps: V8: cherry-pick f6bef09b3b0a
Original commit message:

    [turboshaft] initialize constant_value_ to an empty value

    gcc-10 seems to have a bug were not initializing this value
    throws this compilation error:
    ```
    src/compiler/turboshaft/assembler.h:680:16: error: ‘<anonymous>’ is used uninitialized in this function [-Werror=uninitialized]
      680 |     return Get();
    ```
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86465

    Bug: v8:12783
    Change-Id: I7a5fee5009b866a801326fba734c156c3cfdb1b0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5503350
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/main@{#93675}

Refs: f6bef09b3b
PR-URL: https://github.com/nodejs/node/pull/52802
Fixes: https://github.com/nodejs/node/issues/52661
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-05-03 13:30:02 +00:00
Richard Lau
40ef9d541e
deps: V8: cherry-pick 500de8bd371b
Original commit message:

    [gcc] Fix gcc / bazel build

    Add <iomanip> includes to fix gcc/blaze builds. Also ignore a dangling
    pointer warning introduced in newer gcc, since it has false positives
    on some uses of scope classes.

    Change-Id: Ib86a2437ffc34b5497a5b8619013d6d5b4ea30fe
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5380192
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92977}

Refs: 500de8bd37
PR-URL: https://github.com/nodejs/node/pull/52676
Fixes: https://github.com/nodejs/node/issues/52675
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2024-04-26 22:32:46 +00:00
Joyee Cheung
d4630d9d3e deps: V8: cherry-pick cd10ad7cdbe5
Original commit message:

    [compiler] reset script details in functions deserialized from code cache

    During the serialization of the code cache, V8 would wipe out the
    host-defined options, so after a script id deserialized from the
    code cache, the host-defined options need to be reset on the script
    using what's provided by the embedder when doing the deserializing
    compilation, otherwise the HostImportModuleDynamically callbacks
    can't get the data it needs to implement dynamic import().

    Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#93323}

Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:23 +00:00
Michaël Zasso
0d6ac38b13 deps: V8: revert CL 5331688
On Windows debug builds, it is not allowed to dereference empty
iterators.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5331688
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:23 +00:00
StefanStojanovic
4728eb0f02 deps: patch V8 to support compilation with MSVC
After enabling -std:c++20 on Windows, patch is now much smaller.

PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:22 +00:00
StefanStojanovic
b338202fab build: compile with C++20 support on Windows
Our Linux build infra is not ready for it yet,
but V8 is making it difficult to compile on Windows
without it.

Refs: https://github.com/nodejs/node/issues/45402
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:22 +00:00