build: prevent C++ linker from overwriting executable
Running make run-ci
with multiple jobs, it is possible for the C++ linker
to be invoked while build-addons is running, this can result in intermittent
ENOENT failures when spawning nodeGyp
. To prevent this, originally
provide a different name for the executable, and rename it to the correct
name only after the link completes successfully.
Fixes #22006 (closed). Kinda. Sorta.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines