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

build: compile with C++20 support on Windows #52594

Closed
wants to merge 1 commit into from
Closed

build: compile with C++20 support on Windows #52594

wants to merge 1 commit into from

Conversation

targos
Copy link
Member

@targos targos commented Apr 19, 2024

Our Linux build infra is not ready for it yet,
but V8 is making it difficult to compile on Windows
without it.

Refs: #45402

Our Linux build infra is not ready for it yet,
but V8 is making it difficult to compile on Windows
without it.

Refs: #45402
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Apr 19, 2024
@targos targos mentioned this pull request Apr 19, 2024
@targos
Copy link
Member Author

targos commented Apr 19, 2024

/cc @nodejs/build @nodejs/platform-windows

@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 19, 2024
@targos
Copy link
Member Author

targos commented Apr 19, 2024

@nodejs/tsc I'm labeling semver-major out of caution (IIRC common.gypi has an impact on native addons).

@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 19, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 19, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought Windows was the remaining blocker for #45402? I think we have gcc 10 on all the Linux machines now but I'm wary of making this kind of switch across-the-board days before the Node.js 22 release.

Approving subject to passing CI.

Copy link
Contributor

@StefanStojanovic StefanStojanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM given that Windows CI passes. I'll use this change locally until it lands 👍

@targos
Copy link
Member Author

targos commented Apr 19, 2024

@richardlau the last tentative on #45427 showed issues with Debian 12: #45427 (comment)

@targos
Copy link
Member Author

targos commented Apr 19, 2024

OTOH you're right. This fails on Windows 🤔

@targos
Copy link
Member Author

targos commented Apr 19, 2024

@StefanStojanovic There are a few errors. Here's one of them:

17:42:23 C:\workspace\node-compile-windows\node\deps\v8\src\compiler\turboshaft\assembler.h(4049,9): error C2614: 'v8::internal::compiler::turboshaft::TSAssembler<v8::internal::compiler::turboshaft::GraphVisitor,v8::internal::compiler::turboshaft::LateEscapeAnalysisReducer,v8::internal::compiler::turboshaft::MachineOptimizationReducer,v8::internal::compiler::turboshaft::MemoryOptimizationReducer,v8::internal::compiler::turboshaft::BranchEliminationReducer,v8::internal::compiler::turboshaft::LateLoadEliminationReducer,v8::internal::compiler::turboshaft::ValueNumberingReducer>': illegal member initialization: 'Assembler' is not a base or member [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8_compiler.vcxproj]

@targos
Copy link
Member Author

targos commented Apr 19, 2024

If it works with V8 12.4, I can add the commit to the other PR.

@StefanStojanovic
Copy link
Contributor

@StefanStojanovic There are a few errors. Here's one of them:

17:42:23 C:\workspace\node-compile-windows\node\deps\v8\src\compiler\turboshaft\assembler.h(4049,9): error C2614: 'v8::internal::compiler::turboshaft::TSAssembler<v8::internal::compiler::turboshaft::GraphVisitor,v8::internal::compiler::turboshaft::LateEscapeAnalysisReducer,v8::internal::compiler::turboshaft::MachineOptimizationReducer,v8::internal::compiler::turboshaft::MemoryOptimizationReducer,v8::internal::compiler::turboshaft::BranchEliminationReducer,v8::internal::compiler::turboshaft::LateLoadEliminationReducer,v8::internal::compiler::turboshaft::ValueNumberingReducer>': illegal member initialization: 'Assembler' is not a base or member [C:\workspace\node-compile-windows\node\tools\v8_gypfiles\v8_compiler.vcxproj]

I'm seeing them too (locally added change in V8 v12.4 update branch)

If it works with V8 12.4, I can add the commit to the other PR.

Since v12.4 is the first one where I saw c++20 errors, I'll work on it with the changes from this PR. Once it is ready I'll open a PR to your branch as usual and will add this change either as part of that PR. I'll make it so there are 2 commits, one for c++20 and the other for V8, you can later decide to squash them or leave them both. Does this make sense?

@targos
Copy link
Member Author

targos commented Apr 19, 2024

Perfect, thank you!

@targos
Copy link
Member Author

targos commented Apr 19, 2024

Will be included in #52465

@targos targos closed this Apr 19, 2024
@richardlau richardlau deleted the c++20-win branch April 19, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants