src: allow loading lib/ files from disk
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included - [½] documentation is changed or added
-
commit message follows commit guidelines
Affected core subsystem(s)
src
Description of change
Introduce a --internal-modules-source-dir=
CLI option that allows
developers to test a modified version of the Node JavaScript source
files without rebuilding the Node executable and instead loading
the files from a directory on the disk.
This can be useful in situations where compiling and linking takes a disproportionately long time, e.g. debugging Node core on slow machines or inside of VMs, or installing a full compiler toolchain to build Node does not seem reasonable.
This change does not document the CLI option in the official
documentation as it targets developers, not users, of Node.
Instead, a note is left in CONTRIBUTING.md
.