Skip to content
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

Can't Build With C++20 #45694

Closed
dharesign opened this issue Dec 1, 2022 · 3 comments
Closed

Can't Build With C++20 #45694

dharesign opened this issue Dec 1, 2022 · 3 comments
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@dharesign
Copy link
Contributor

Version

No response

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

Try compiling with C++20 enabled.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

V8's CppHeapCreateParams requires aggregate initialization. It used to define deleted copy constructor and copy assignment members but that breaks aggregate initialization in C++20. V8 fixed this in 9.9: v8/v8@a66b09e

When Node updated past V8 9.9, it apparently saw a compiler error on Windows: https://bugs.chromium.org/p/v8/issues/detail?id=12661

The fix Node applied was to revert the v8 commit. This reversion is still being applied today: 9f84d3e

I am unsure what was the trigger of that compilation error, I can't reproduce it if I copy-paste the relevant parts into godbolt and compile with the version of MSVC used in the linked issue: https://godbolt.org/z/os314xK3s

I suggest reverting this commit, and fixing the root cause if it still exists.

Additional information

No response

@mscdex
Copy link
Contributor

mscdex commented Dec 1, 2022

See #45427.

@dharesign
Copy link
Contributor Author

Note that we make use of cppgc in a node add-on. To be able to do that, as Node.js doesn't initialize the CppHeap, we are initializing it ourselves. That's likely why the code in #45427 works, because Node doesn't actually try to create the CppHeap. Note also that in order to use cppgc, we have had to modify the Node build to include all the extra headers required.

@aduh95
Copy link
Contributor

aduh95 commented Dec 1, 2022

Closing as duplicate of #45402. Let me know if I misunderstood something at this should be re-open.

@aduh95 aduh95 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
@aduh95 aduh95 added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

3 participants