Skip to content

Commit

Permalink
build: add option to enable clang-cl on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Oct 16, 2024
1 parent e030187 commit e2b569c
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions patches/node/build_compile_with_c_20_support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8
This can be removed when Electron upgrades to a version of Node.js containing the required V8 version.

diff --git a/common.gypi b/common.gypi
index bdf1a1f33f3ea09d933757c7fee87c563cc833ab..2eb62610db2f0ebf68fa9a55ffba98291ecfe451 100644
index 74616453e2e047acbb9e25f2f93ebeab06011669..bce15fc4a8b3f2fa0b5a588e6a2b28d2b8b6ac45 100644
--- a/common.gypi
+++ b/common.gypi
@@ -305,7 +305,7 @@
'VCCLCompilerTool': {
'AdditionalOptions': [
'/Zc:__cplusplus',
- '-std:c++17'
+ '-std:c++20'
@@ -518,7 +518,7 @@
'-fno-rtti',
'-fno-exceptions',
'-fno-strict-aliasing',
- '-std=gnu++17',
+ '-std=gnu++20',
],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
@@ -487,7 +487,7 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix os400 cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++17' ],
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++20' ],
'defines': [ '__STDC_FORMAT_MACROS' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
@@ -658,7 +658,7 @@
@@ -688,7 +688,7 @@
['clang==1', {
'xcode_settings': {
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
Expand Down

0 comments on commit e2b569c

Please sign in to comment.