export CC="ccache clang"
export CXX="ccache clang++"
./configure --ninja --debug
make -j4
for compile_commands.json
:
make clean
bear -- make -j4
if [ ! -r node_g ] || [ ! -L node_g ]; then ln -fs out/Debug/node node_g; fi
make install PREFIX=/opt/node-debug/
/opt/node-debug/
├── bin
│ ├── corepack -> ../lib/node_modules/corepack/dist/corepack.js
│ ├── node
│ ├── npm -> ../lib/node_modules/npm/bin/npm-cli.js
│ └── npx -> ../lib/node_modules/npm/bin/npx-cli.js
├── include
│ └── node
├── lib
│ └── node_modules
└── share
├── doc
└── man
./bin/node
Welcome to Node.js v21.0.0-pre.
Type ".help" for more information.
> console.log("Hello, World!");
Hello, World!
undefine
Ctrl+D to exit the REPL
vi src/node_main.cc