mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
build: add option to enable clang-cl on Windows
Most changes are gated by the `clang==1` condition to avoid breaking MSVC builds. Select C/C++ language standard with ClCompile options. This avoids passing the `-std:c++20` flag while compiling C code. Do it only under clang option to avoid breaking addons until node-gyp supports the new LanguageStandard options. Disable precompiled header configuration for now as it doesn't seem to work with clang-cl. Disable C++20 warnings emitted by the Visual Studio C++ STL. They're very noisy and not our responsibility to fix. Co-authored-by: Daniel Lemire <daniel@lemire.me> Co-authored-by: Stefan Stojanovic <stefan.stojanovic@janeasystems.com> PR-URL: https://github.com/nodejs/node/pull/52870 Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
dcd8b82e15
commit
efa63f3d05
8 changed files with 120 additions and 53 deletions
4
node.gyp
4
node.gyp
|
@ -610,8 +610,8 @@
|
|||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
'AdditionalOptions': [
|
||||
'/WHOLEARCHIVE:<(node_lib_target_name)<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/<(node_lib_target_name)<(STATIC_LIB_SUFFIX)',
|
||||
'/WHOLEARCHIVE:<(PRODUCT_DIR)/lib/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue