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: build v8 with -fvisibility=hidden on non-macOS platforms too #56290

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

joyeecheung
Copy link
Member

Split from #56275 since it seems to cause gcc on some machines in the CI to time out or run out of memory. Trying to see if it's just a CI hiccup or if it's something that needs to be worked around.

V8 should be built with -fvisibility=hidden, otherwise
the resulting binary would contain unnecessary symbols. In
particular, on macOS, this leads to 5000+ weak symbols
resolved at runtime, leading to a startup regression.

On macOS this also reduces the binary size about ~10MB.

It's only enabled on macOS in this patch as gcc can time out
or run out of memory on some machines in the CI with
-fvisibility=hidden.
This enables -fvisibility=hidden on platforms other than macOS,
wherever it's supported.
@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. v8 engine Issues and PRs related to the V8 dependency. labels Dec 17, 2024
@joyeecheung joyeecheung added request-ci Add this label to start a Jenkins CI on a PR. and removed v8 engine Issues and PRs related to the V8 dependency. tools Issues and PRs related to the tools directory. needs-ci PRs that need a full CI run. labels Dec 17, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 17, 2024
@nodejs-github-bot
Copy link
Collaborator

@richardlau
Copy link
Member

FWIW changing compile/link options will invalidate any stored CCACHE entries, which would result in more of V8 having to be recompiled.

Generally most of the x64 CI machines in Jenkins are now 4 GB RAM + swap (2 GB).

Anything running on a machine with _container_ in its name will be sharing memory with other containers on the same host (albeit these hosts have a lot of memory (32 GB, IIRC)).

@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants