-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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. |
For people reading this: I strongly suspect that the problem is not with V8 or Node.js, but rather a compiler/runtime library issue. That is, it is warranted to 'force' the issue. |
Interestingly https://ci.nodejs.org/job/node-test-commit-linuxone/43448/nodes=rhel8-s390x/ succeeded with gcc 12.2.1 (gcc-toolset-12 on RHEL 8). |
@richardlau Yes. It is probably not a compiler bug per se... hence "compiler/runtime library issue". |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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: #45402