Skip to content

v8: update v8 patch to avoid breaking building with clang - #52303

Closed
zcbenz wants to merge 1 commit into
nodejs:mainfrom
zcbenz:v8-fix-compilation
Closed

v8: update v8 patch to avoid breaking building with clang#52303
zcbenz wants to merge 1 commit into
nodejs:mainfrom
zcbenz:v8-fix-compilation

Conversation

@zcbenz

Copy link
Copy Markdown
Contributor

When building with C++20 using a very new clang (which is used by the GN build), compilation would fail caused because of the change in b9d806a.

The detailed errors can be found in:
https://github.com/photoionization/node_with_gn/actions/runs/8501717771/job/23284924676

My understanding of the error is that, after changing if constexpr to if, some code that were not supposed to be compiled are now compiled, and it is causing problems for certain compiler settings.

@zcbenz
zcbenz requested a review from targosApril 1, 2024 10:18
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Apr 1, 2024
@targos

Copy link
Copy Markdown
Member

@StefanStojanovic FYI

@targostargos added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 1, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 1, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@targos

Copy link
Copy Markdown
Member

@zcbenz Unfortunately this breaks compilation with MSVC.

@zcbenz
zcbenzforce-pushed the v8-fix-compilation branch 2 times, most recently from c491545 to 50735b2CompareApril 2, 2024 10:00
@zcbenz
zcbenzforce-pushed the v8-fix-compilation branch from 50735b2 to c3bc66aCompareApril 2, 2024 10:02
@zcbenzzcbenz changed the title fix: update v8 patch to avoid breaking building with clangv8: update v8 patch to avoid breaking building with clangApr 2, 2024
@zcbenzzcbenz added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 2, 2024
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 2, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@zcbenz

Copy link
Copy Markdown
ContributorAuthor

@zcbenz Unfortunately this breaks compilation with MSVC.

It turns out the V8_COMPILER_IS_MSVC macro is not defined in header. I have updated the change and it builds with MSVC now.

@gengjiawen

Copy link
Copy Markdown
Member

Can you also try upstream those changes ?

@zcbenz

zcbenz commented Apr 2, 2024

Copy link
Copy Markdown
ContributorAuthor

Can you also try upstream those changes ?

This PR means to fix the breakages introduced by b9d806a, according to its commit message it is not going to be upstreamed, so neither will this change.

@StefanStojanovic

Copy link
Copy Markdown
Contributor

This PR means to fix the breakages introduced by b9d806a, according to its commit message it is not going to be upstreamed, so neither will this change.

You are correct, this will not be upstreamed. @zcbenz, as a part of work on #52293 I'm porting my patch there (cannot apply cleanly because the files it modifies were changed in the meantime). Once it's ready (eg. working on all platforms), I'll let you know and we can apply your changes before landing it in the V8 update branch, so it's all there together.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@StefanStojanovic

Copy link
Copy Markdown
Contributor

@zcbenz just to let you know that neither V8, nor its patches I made starting from v12.3 have reducer_list_contains in that place, so your setup with the latest clang should work correctly out of the box as far as I can tell.

@zcbenz

Copy link
Copy Markdown
ContributorAuthor

Thanks for letting me know! I'll give it a try.

@zcbenzzcbenz closed this Apr 27, 2024
@zcbenz
zcbenz deleted the v8-fix-compilation branch April 27, 2024 08:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.v8 engineIssues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@zcbenz@nodejs-github-bot@targos@gengjiawen@StefanStojanovic@anonrig