-
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
doc: add mold to speeding up section #52179
doc: add mold to speeding up section #52179
Conversation
@H4ad Hi Vinicius, can you review this document improve? |
@congzhangzh Sorry for the delay, this PR looks good to me, do you still want to close? |
The first time I tried |
Please, just fix the lint issues:
|
@H4ad Hi Vinicius, I fixed it by make format-md :) |
Commit Queue failed- Loading data for nodejs/node/pull/52179 ✔ Done loading data for nodejs/node/pull/52179 ----------------------------------- PR info ------------------------------------ Title doc: add mold to speeding up section (#52179) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch congzhangzh:add_mold_to_speed_up_section -> nodejs:main Labels doc, build, commit-queue-squash Commits 3 - doc: add mold to speeding up section - doc: format-md for speeding up section - doc: fix lint-md failed Committers 2 - GitHub - Cong Zhang <[email protected]> PR-URL: https://github.com/nodejs/node/pull/52179 Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Yagiz Nizipli ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/52179 Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Yagiz Nizipli -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - doc: fix lint-md failed ℹ This PR was created on Thu, 21 Mar 2024 17:08:16 GMT ✔ Approvals: 2 ✔ - Vinícius Lourenço Claro Cardoso (@H4ad): https://github.com/nodejs/node/pull/52179#pullrequestreview-1956285442 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/52179#pullrequestreview-1956294857 ✔ Last GitHub CI successful ℹ Green GitHub CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/8420226631 |
@H4ad Hi Vinicius, the last commit 4 fix lint-md need to be approved before landing, tks:) |
Landed in fc02918 |
brew install ccache mold # see https://brew.sh | ||
export CC="ccache cc" # add to ~/.zshrc or other shell config file | ||
export CXX="ccache c++" # add to ~/.zshrc or other shell config file | ||
export LDFLAGS="-fuse-ld=mold" # add to ~/.zshrc or other shell config file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support for Mach-O targets has been removed.
See https://github.com/bluewhalesystems/sold for macOS/iOS support.
I think we should use sold
in macOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@congzhangzh Are you willing to open a PR to replace mold
to sold
on mac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget that sold is not available on homebrew
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, please allow me do more test on mac os
@rui314 Hi Rui, is that ok we use sold in nodejs, as this mark on https://bluewhale.systems/ websit
What is the difference between sold and mold?
Other than the branding and their licenses, sold and mold behave the same. Both sold and mold are developed >> by us and our contributors.
btw, and whether mold merge all sold functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sold is not actively maintained anymore because with Xcode 15, Apple has made their linker much faster than it was. So you want to recommend it instead of sold. IIRC, the Apple's new linker is available as ld-prime after installing Xcode 15.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sold is not actively maintained anymore because with Xcode 15, Apple has made their linker much faster than it was. So you want to recommend it instead of sold. IIRC, the Apple's new linker is available as ld-prime after installing Xcode 15.
@rui314 @H4ad @anonrig Hi folks, can you help to ensure that the new linker ld-prime works, which point by Rui
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Apple's linker is not my product, and I no longer working on macOS, I don't know whether that LDFLAGS works or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have macos :/
Also, as mentioned by @anonrig, I think we should remove mold
from macos
section and don't use sold
since is not maintained anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, got it, I will do a pull request later:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR-URL: nodejs#52179 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#52179 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: #52179 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: #52179 Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]>
C/C++ link is slow, especially for node like projects, which will link GBs data to 100MB like size
C/C++ link process can not be cached
mold is really really fast