Skip to content

v8,tools: expose necessary V8 defines - #50820

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
zcbenz:v8-defines
Nov 25, 2023
Merged

v8,tools: expose necessary V8 defines#50820
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
zcbenz:v8-defines

Conversation

@zcbenz

Copy link
Copy Markdown
Contributor

There are a few C++ defines in V8's public headers and for native modules to work correctly the defines must be exactly the same when building Node.js and native modules. V8 has a list of the C++ defines that appear in public headers in V8/BUILD.gn and Node's GYP files are currently out of sync with the list, which causes problems when building native modules targeting Electron and the GN build of Node.

In this PR I have updated the GYP files to add necessary C++ defines based on the feature flags, there is also changes on the tools/generate_config_gypi.py script to make GN configurations include necessary feature flags in config.gypi.

The defines are currently manually synchronized between GYP and V8's GN files, and I am making changes on V8's side to get rid of it: https://chromium-review.googlesource.com/c/v8/v8/+/5040612.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/v8-update

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency. labels Nov 20, 2023
@gengjiawengengjiawen added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 21, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 21, 2023
@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

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadcommon.gypi
@gengjiawengengjiawen added the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 25, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 25, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 0bb5d88 into nodejs:mainNov 25, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 0bb5d88

@zcbenz
zcbenz deleted the v8-defines branch November 26, 2023 23:48
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 27, 2023
PR-URL: nodejs#50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Nov 27, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@RafaelGSSRafaelGSS mentioned this pull request Nov 28, 2023
RafaelGSS pushed a commit that referenced this pull request Nov 29, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@UlisesGasconUlisesGascon mentioned this pull request Dec 12, 2023
UlisesGascon pushed a commit that referenced this pull request Dec 13, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 15, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Dec 19, 2023
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
UlisesGascon pushed a commit that referenced this pull request Jan 9, 2024
PR-URL: #50820
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
codebytere added a commit to electron/electron that referenced this pull request Jan 10, 2024
zcbenz pushed a commit to electron/electron that referenced this pull request Jan 12, 2024
zcbenz pushed a commit to electron/electron that referenced this pull request Jan 12, 2024
codebytere added a commit to electron/electron that referenced this pull request Jan 15, 2024
codebytere added a commit to electron/electron that referenced this pull request Jan 15, 2024
codebytere added a commit to electron/electron that referenced this pull request Jan 16, 2024
codebytere added a commit to electron/electron that referenced this pull request Jan 18, 2024
jkleinsc pushed a commit to electron/electron that referenced this pull request Jan 18, 2024
codebytere added a commit to electron/electron that referenced this pull request Jan 18, 2024
jkleinsc pushed a commit to electron/electron that referenced this pull request Jan 18, 2024
* chore: bump node in DEPS to v20.11.0
* module: bootstrap module loaders in shadow realm
nodejs/node#48655
* src: add commit hash shorthand in zlib version
nodejs/node#50158
* v8,tools: expose necessary V8 defines
nodejs/node#50820
* esm: do not call getSource when format is commonjs
nodejs/node#50465
* esm: fallback to readFileSync when source is nullish
nodejs/node#50825
* vm: allow dynamic import with a referrer realm
nodejs/node#50360
* test: skip test-diagnostics-channel-memory-leak.js
nodejs/node#50327
* esm: do not call getSource when format is commonjs
nodejs/node#50465
* lib: fix assert throwing different error messages in ESM and CJS
nodejs/node#50634
* src: fix compatility with upcoming V8 12.1 APIs
nodejs/node#50709
* deps: update base64 to 0.5.1
nodejs/node#50629
* src: avoid silent coercion to signed/unsigned int
nodejs/node#50663
* src: fix compatility with upcoming V8 12.1 APIs
nodejs/node#50709
* chore: fix patch indices
* chore: update patches
* test: disable TLS cipher test
This can't be enabled owing to BoringSSL incompatibilities.
nodejs/node#50186
* fix: check for Buffer and global definition in shadow realm
nodejs/node#51239
* test: disable parallel/test-shadow-realm-custom-loader
Incompatible with our asar logic, resulting in the following failure:
> Failed to CompileAndCall electron script: electron/js2c/asar_bundle
* chore: remove deleted parallel/test-crypto-modp1-error test
* test: make test-node-output-v8-warning generic
nodejs/node#50421
* chore: fixup ModuleWrap patch
* test: match wpt/streams/transferable/transform-stream-members.any.js to upstream
* fix: sandbox is not enabled on arm
* chore: disable v8 sandbox on ia32/arm
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.needs-ciPRs that need a full CI run.toolsIssues and PRs related to the tools directory.v8 engineIssues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@zcbenz@nodejs-github-bot@jasnell@gengjiawen