Skip to content

Commit 3cee2ae

Browse files
committed
build: add option to enable clang-cl on Windows
nodejs/node#52870
1 parent 890bf61 commit 3cee2ae

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

patches/node/build_compile_with_c_20_support.patch

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,19 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
1010
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.
1111

1212
diff --git a/common.gypi b/common.gypi
13-
index bdf1a1f33f3ea09d933757c7fee87c563cc833ab..2eb62610db2f0ebf68fa9a55ffba98291ecfe451 100644
13+
index 74616453e2e047acbb9e25f2f93ebeab06011669..bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45 100644
1414
--- a/common.gypi
1515
+++ b/common.gypi
16-
@@ -305,7 +305,7 @@
17-
'VCCLCompilerTool': {
18-
'AdditionalOptions': [
19-
'/Zc:__cplusplus',
20-
- '-std:c++17'
21-
+ '-std:c++20'
16+
@@ -518,7 +518,7 @@
17+
'-fno-rtti',
18+
'-fno-exceptions',
19+
'-fno-strict-aliasing',
20+
- '-std=gnu++17',
21+
+ '-std=gnu++20',
2222
],
23-
'BufferSecurityCheck': 'true',
24-
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
25-
@@ -487,7 +487,7 @@
26-
}],
27-
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
28-
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
29-
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
30-
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
3123
'defines': [ '__STDC_FORMAT_MACROS' ],
3224
'ldflags': [ '-rdynamic' ],
33-
'target_conditions': [
34-
@@ -658,7 +658,7 @@
25+
@@ -688,7 +688,7 @@
3526
['clang==1', {
3627
'xcode_settings': {
3728
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',

0 commit comments

Comments
 (0)