node
node copied to clipboard
build: fix gyp configs in debug
Gyp generated build files should be able to be built in either Release/Debug mode.
- make: single entry build file, two configurations by cli:
make -C out BUILDTYPE=Release
andmake -C out BUILDTYPE=Debug
. - msbuild: single entry build file, two configurations by cli:
msbuild node.sln /p:Configuration=Release
andmsbuild node.sln /p:Configuration=Debug
. - ninja: two directories in
out/
, build withninja -C out/Release
orninja -C out/Debug
.
Variables that changes with either Release or Debug configuration should be defined in a configuration level, instead of the root level. Example: https://github.com/nodejs/node/blob/8e5d88b6413558b6b4bc127f87fc8122311639ae/common.gypi#L132-L133
This fixes generating invalid build files.
Additionally, v8_gypfiles/toolchain.gypi
duplicates defines in
v8_gypfiles/features.gypi
. Remove the duplications in
toolchains.gypi
Fixes: https://github.com/nodejs/node/issues/53446