-
Notifications
You must be signed in to change notification settings - Fork 30k
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 node.js using clangcl when under Windows #52809
Comments
I recall that it was recommended by MS folks to build using clang on Windows. |
One issue to consider is that Google switched over so they are developing V8 under ClangCL. |
I was thinking about opening an umbrella issue with a checklist or something like that for all things related to enabling ClangCL compilation on Windows, but since there is already this issue if you agree @lemire we can use it for that (if not, I'll create a separate issue with the content of this message). Anyway, the following is (not sorted according to priority) a list of things done, being worked on, or that should be worked on before stating ClangCL is officially supported for compiling Node.js on Windows:
I might have missed something, but most things should be covered here. If anyone notices something missing or wrong, please let me know. cc: @targos @nodejs/platform-windows |
@StefanStojanovic It definitively makes sense to leverage the current issue. |
Great! One issue I see with it is that if the comment gets edited often (eg. I edited it just now to add a PR I opened) it will probably not be sent as a notification, plus I'm probably the only one who can edit it. If anyone has a better idea eg. a GitHub Project or something like that, I'm all for it. |
@StefanStojanovic I can edit your comment, but another take on it would be to edit the issue first post (that is, the text I have written). Do you have edit access? I think you should be able to edit the issue... I think you have access... don't you? That is, I don't own this issue, it should be a collective one. |
Nope, I do not see edit. This is what I see. Not sure GH supports collective issues, would be great if it did... |
@joyeecheung Can you help? I think we would like @StefanStojanovic to have the ability to edit this issue. |
@lemire He will have the ability to edit once he becomes a nodejs collaborator (probably next week) |
@StefanStojanovic Given @H4ad's answer, I recommend just waiting a week or so. ;-) |
https://issues.chromium.org/issues/341803745 fp16 in v8 has been updated to the latest version, I think the blocker on the v8 side can be removed. |
PR-URL: #53134 Refs: #52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #53134 Refs: #52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #53228 Refs: #52809 Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #53228 Refs: #52809 Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#53134 Refs: nodejs#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#53228 Refs: nodejs#52809 Reviewed-By: Michaël Zasso <[email protected]>
We should probably update this point since V8 announced that they will drop MSVC support in September: https://groups.google.com/g/v8-dev/c/8mSxb2UriSU |
PR-URL: nodejs#53134 Refs: nodejs#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#53228 Refs: nodejs#52809 Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#53134 Refs: nodejs#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#53134 Refs: nodejs#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
This uses the backported ICU fix needed for compiling with ClangCL. Refs: nodejs#54502 Fixes: nodejs#34201 PR-URL: nodejs#54655 Refs: nodejs#52809 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Steven R Loomis <[email protected]>
PR-URL: nodejs#53134 Refs: nodejs#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> PR-URL: nodejs#54536 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#53134 Refs: nodejs/node#52809 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
I just wanted to share my update on this issue: The main branch can now be compiled with ClangCL (e.g., |
Description
Chrome and Firefox are built with Clang under Windows.
@targos made it possible to build Node.js using clang under Windows, see #35433
At least in some tests, this seems to result in better performance:
It is only preliminary, but it is not very difficult to conduct a full examination. There are some maintenance benefits to switching to LLVM under Windows as well. I stress that Node works right now under Windows when compiled with LLVM (credit to @targos).
There is at least one minor issue with ICU: #34201 A tiny patch might be required. I actually expect that it might be the only problem.
I am opening this issue following a request by @mcollina
Further reading: Should Node.js be built with ClangCL under Windows?
Checklist:
vcbuild.bat
to pick from MSVC and CLangCL - Landed in build: add option to enable clang-cl on Windows #52870gyp-next
to enable setting language standard keys in msvs_settings - Landed upstream in feat: support language standard keys in msvs_settings gyp-next#252, will eventually get updated in the main projectccache
or similar tools with ClangCL.If there are no reasons not to, switch to using ClangCL as a default compiler for future releases, the same can also be said for dropping x86 support based on Should we drop support for 32 bit Windows? #42543 (comment)V8 has already dropped support for MSVC and will not accept MSVC-compatibility patches since 13.0, so we'll need to switch to using ClangCL for future releases that use V8 > 13.0The text was updated successfully, but these errors were encountered: