Skip to content

Treat V8 platform symbols same as base #49596

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

Closed

Conversation

sparist
Copy link

@sparist sparist commented Sep 10, 2023

This exports V8 platform symbols in the Node shared library build.

Ticket: #49595

@nodejs-github-bot
Copy link
Collaborator

Review requested:

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

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Sep 10, 2023
@@ -1339,10 +1339,7 @@
'<(V8_ROOT)/src/libplatform/worker-thread.h',
],
'conditions': [
['component=="shared_library"', {
'direct_dependent_settings': {
'defines': ['USING_V8_PLATFORM_SHARED'],
Copy link
Member

Choose a reason for hiding this comment

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

Dropping USING_V8_PLATFORM_SHARED removes the dllimport for consumers. Can you explain how this helps? At first glance it seems like it'd break the build.

Copy link
Author

Choose a reason for hiding this comment

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

The V8 platform symbols were not being exported with dllexport without this change, so I was unable to link on Windows. After the change, it indeed does not break the build. I recall adapting existing code from other V8 GYP code for this.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, let's see what the CI says.

Copy link
Member

Choose a reason for hiding this comment

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

@bnoordhuis I'm not sure any of the regular CI will be testing the shared libray build. We have https://ci.nodejs.org/view/Node.js%20Daily/job/node-test-commit-linux-as-shared-lib/ for linux but I don't think we have the equivalent for windows.

atlowChemi and others added 24 commits September 12, 2023 10:59
PR-URL: nodejs#48548
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#48548
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#48484
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#48569
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#48593
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Null the `joinDuplicateHeaders` property when the parser is freed.

Refs: nodejs#45982
PR-URL: nodejs#48608
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
Move the `joinDuplicateHeaders` option to the correct alphabetical
order.

PR-URL: nodejs#48617
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
`test.todo`, `test.only` and `test.skip` are expected to return the
same as `test`. This commit corrects the inconsistent behavior of
these shorthands.

Fixes: nodejs#48557
PR-URL: nodejs#48555
Reviewed-By: Moshe Atlow <[email protected]>
Co-authored-by: Joyee Cheung <[email protected]>
PR-URL: nodejs#48566
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reorder arguments of internal helper functions such that their order is
consistent across X509 property getters. Add ReturnPropertyThroughBIO()
and ReturnProperty(). Use these new helpers to deduplicate code across
various X509 property getters.

PR-URL: nodejs#48563
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Alba Mendez <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.6 to 2.20.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@83f0fe6...f6e388e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48627
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@80e868c...08b4669)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48628
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@128a634...55d479f)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48626
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#48631
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#48632
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@8e5e7e5...c85c95e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48625
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#48551
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
This reverts commit 893c000.

Refs: nodejs#48575 (comment)
PR-URL: nodejs#48652
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
PR-URL: nodejs#48596
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Signed-off-by: RafaelGSS <[email protected]>
PR-URL: nodejs#48644
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Clarify that `transform._transform()` callback second argument is
used only if the first argument is `null`, i.e. no error occured
processing the chunk.

PR-URL: nodejs#48680
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
When add listener by once, it will be wrapped into another function.
And when pass listener and there is just one event listener added by
once, it will return 0 even if passed listener equal wrapped event
listener.

Refs: nodejs#46523
PR-URL: nodejs#48592
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
It wasn't doing anything, and actually enabling it would cause some
tests to fail.

Refs: nodejs#48576
PR-URL: nodejs#48671
Refs: v8/v8@cb00db4
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
atlowChemi and others added 9 commits September 12, 2023 11:03
PR-URL: nodejs#48757
Fixes: nodejs#48603
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Signed-off-by: RafaelGSS <[email protected]>
PR-URL: nodejs#48677
Reviewed-By: Paolo Insogna <[email protected]>
Removes flakiness from the mentioned test due to the x86 memory limit

PR-URL: nodejs#48750
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#48726
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#48746
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
PR-URL: nodejs#48770
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#48751
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
This is the certdata.txt[0] from NSS 3.93, released on 2023-06-29.

This is the version of NSS that shipped in Firefox 116 on
2023-08-01.

Certificates added:
- Sectigo Public Server Authentication Root E46
- Sectigo Public Server Authentication Root R46
- SSL.com TLS RSA Root CA 2022
- SSL.com TLS ECC Root CA 2022
- Atos TrustedRoot Root CA ECC TLS 2021
- Atos TrustedRoot Root CA RSA TLS 2021

Certificates removed:
- Hongkong Post Root CA 1
- E-Tugra Certification Authority
- E-Tugra Global Root CA RSA v3
- E-Tugra Global Root CA ECC v3

[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_93_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: nodejs#49341
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
@mhdawson
Copy link
Member

Run of sharedlib ci job on linux for this PR - https://ci.nodejs.org/view/Node.js%20Daily/job/node-test-commit-linux-as-shared-lib/1972/

sparist added a commit to Distributive-Network/node that referenced this pull request Sep 12, 2023
Export V8 platform symbols in the Node shared library build,
in the same was as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
sparist added a commit to Distributive-Network/node that referenced this pull request Sep 12, 2023
Export V8 platform symbols in the Node shared library build,
in the same way as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
sparist added a commit to Distributive-Network/node that referenced this pull request Sep 13, 2023
Export V8 platform symbols in the Node shared library build,
in the same way as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
@targos
Copy link
Member

targos commented Sep 13, 2023

Does the problem only affect v18.x?

Export V8 platform symbols in the Node shared library build,
in the same way as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
@sparist
Copy link
Author

sparist commented Sep 13, 2023

The problem presumably affects all versions, but I'm stuck on v18.x due to #49522

@targos
Copy link
Member

targos commented Sep 15, 2023

Then please open the PR against the main branch. It will then be released and backported as any other fix.

@lux01
Copy link
Contributor

lux01 commented Sep 16, 2023

I ran a DLL build of v20.6.1 both with and without these changes and can confirm that the following additional symbols are exported by libnode.dll after this change

diff.txt

@mhdawson
Copy link
Member

@lux01 thanks for comfirming

sparist added a commit to Distributive-Network/node that referenced this pull request Sep 20, 2023
Export V8 platform symbols in the Node shared library build,
in the same way as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
@sparist
Copy link
Author

sparist commented Sep 20, 2023

This pull request is replaced by #49740, which is based on main.

@sparist sparist closed this Sep 20, 2023
sparist added a commit to Distributive-Network/node that referenced this pull request May 16, 2024
Export V8 platform symbols in the Node shared library build,
in the same way as with V8 base, to allow linking on Windows.

PR-URL: nodejs#49596
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.