diff --git a/BUILDING.md b/BUILDING.md index 53f636a4cf641e..15f8f81d3a1b71 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -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 @@ -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