Skip to content

Commit 315fed5

Browse files
targoslemire
andcommitted
build: select C/C++ language standard with ClCompile options
This avoids passing the `-std:c++20` flag while compiling C code. Co-authored-by: Daniel Lemire <[email protected]>
1 parent c0ab79d commit 315fed5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common.gypi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,11 @@
284284
],
285285
'msvs_settings': {
286286
'VCCLCompilerTool': {
287+
# -std:c++20
288+
'LanguageStandard': 'stdcpp20',
289+
'LanguageStandard_C': 'stdc11',
287290
'AdditionalOptions': [
288291
'/Zc:__cplusplus',
289-
# The following option enables c++20 on Windows. This is needed for V8 v12.4+
290-
'-std:c++20',
291292
# The following option reduces the "error C1060: compiler is out of heap space"
292293
'/Zm2000',
293294
],

0 commit comments

Comments
 (0)