-
Notifications
You must be signed in to change notification settings - Fork 29.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: compile with C++20 support #45427
Conversation
Review requested:
|
I see a lot of
|
I think V8 built fine. There's an error in
Any suggestions? |
If I understand https://unicode-org.atlassian.net/browse/ICU-22014 correctly, we need to build ICU with |
I pushed a commit try to fix, not verified |
Looks similar problem to DeserializeRequest error. |
hmm, what if we use designated initializers? e.g. instead of |
GCC 8 and 9 expect |
I found the cause: https://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2018/p1008r1.pdf, we need to remove all the constructors of the aggregate type, even the diff --git a/src/env.h b/src/env.h
index 3d44e0acbd..8fbd48d58d 100644
--- a/src/env.h
+++ b/src/env.h
@@ -499,9 +499,6 @@ struct DeserializeRequest {
v8::Global<v8::Object> holder;
int index;
InternalFieldInfoBase* info = nullptr; // Owned by the request
-
- // Move constructor
- DeserializeRequest(DeserializeRequest&& other) = default;
};
struct EnvSerializeInfo {
@@ -565,13 +562,6 @@ struct SnapshotData {
static bool FromBlob(SnapshotData* out, FILE* in);
~SnapshotData();
-
- SnapshotData(const SnapshotData&) = delete;
- SnapshotData& operator=(const SnapshotData&) = delete;
- SnapshotData(SnapshotData&&) = delete;
- SnapshotData& operator=(SnapshotData&&) = delete;
-
- SnapshotData() = default;
};
void DefaultProcessExitHandlerInternal(Environment* env, ExitCode exit_code); |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Most platforms build passed. MSVC comes no surprise, v8 failed on MSVC. 15:01:24 C:\workspace\node-compile-windows\node\deps\v8\src\handles\handles.h(143,37): error C2027: use of undefined type 'v8::internal::Object' [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8_base_without_compiler.vcxproj]
|
See https://bugs.chromium.org/p/chromium/issues/detail?id=1377771#c4 This is fixed in recent versions of MSVC. |
So when latest MSVC released, we only have issues on freebsd and alpine. Run into less issues than I think. But I still want gcc-10 as a minimum on next major. |
I'll land manually because |
https://ci.nodejs.org/view/All/job/post-build-status-update/ can be triggered manually |
Landed in c7e4209 |
This is necessary to compile V8 with C++20 support. Refs: nodejs/node#45427
This is necessary to compile V8 with C++20 support. Refs: nodejs/node#45427
Closes: nodejs#45402 PR-URL: nodejs#45427 Fixes: nodejs#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>
Closes: nodejs#45402 PR-URL: nodejs#45427 Fixes: nodejs#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>
Closes: nodejs#45402 PR-URL: nodejs#45427 Fixes: nodejs#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>
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 nodejs/node#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}
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 nodejs#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: v8/v8@35888fe
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 #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: v8/v8@35888fe PR-URL: #53728 Refs: #45427 Refs: nodejs/help#4406 Refs: #53633 Refs: nodejs/help#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>
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 #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: v8/v8@35888fe PR-URL: #53728 Refs: #45427 Refs: nodejs/help#4406 Refs: #53633 Refs: nodejs/help#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>
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 nodejs#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: v8/v8@35888fe PR-URL: nodejs#53728 Refs: nodejs#45427 Refs: nodejs/help#4406 Refs: nodejs#53633 Refs: nodejs/help#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>
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 nodejs#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: v8/v8@35888fe PR-URL: nodejs#53728 Refs: nodejs#45427 Refs: nodejs/help#4406 Refs: nodejs#53633 Refs: nodejs/help#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>
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 #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: v8/v8@35888fe PR-URL: #53728 Refs: #45427 Refs: nodejs/help#4406 Refs: #53633 Refs: nodejs/help#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>
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 nodejs#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: v8/v8@35888fe PR-URL: nodejs#53728 Refs: nodejs#45427 Refs: nodejs/help#4406 Refs: nodejs#53633 Refs: nodejs/help#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>
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 nodejs#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: v8/v8@35888fe PR-URL: nodejs#53728 Refs: nodejs#45427 Refs: nodejs/help#4406 Refs: nodejs#53633 Refs: nodejs/help#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>
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 nodejs#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: v8/v8@35888fe PR-URL: nodejs#53728 Refs: nodejs#45427 Refs: nodejs/help#4406 Refs: nodejs#53633 Refs: nodejs/help#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>
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 #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: v8/v8@35888fe PR-URL: #53728 Refs: #45427 Refs: nodejs/help#4406 Refs: #53633 Refs: nodejs/help#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: #54077 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Closes: #45402