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

[BUILDING.md] Update GNU/Linux Speeding up section #52116

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -532,16 +532,21 @@ make test-only
#### Speeding up frequent rebuilds when developing

If you plan to frequently rebuild Node.js, especially if using several branches,
installing `ccache` can help to greatly reduce build times. Set up with:
installing `ccache` and `mold` can help to greatly reduce build times. Set up with:

On GNU/Linux:

```bash
sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
export CC="ccache gcc" # add to your .profile
export CXX="ccache g++" # add to your .profile
sudo apt install ccache mold # for Debian/Ubuntu, included in most Linux distros
export CC="ccache gcc" # add to your .profile
export CXX="ccache g++" # add to your .profile
export LDFLAGS="-fuse-ld=mold" # add to your .profile
```

Refs:
1. https://ccache.dev/performance.html
2. https://github.com/rui314/mold

On macOS:

```bash
Expand Down Expand Up @@ -578,6 +583,15 @@ to run it again before invoking `make -j4`.

### Windows

#### Tips
You may need disable vcpkg integration if you got link error about symbol redefine related to zlib.lib(zlib1.dll), even you do not install it by hand, as vcpkg is part of [CLion](https://www.jetbrains.com/clion) and Visual Studio

```bat
vcpkg integration remove
```

Refs: [vcpkg](https://github.com/microsoft/vcpkg/), #24448, https://github.com/microsoft/vcpkg/issues/#37518

#### Prerequisites

##### Option 1: Manual install
Expand Down