File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change 24
24
"defines" : [
25
25
"NAPI_VERSION=<(napi_build_version)" ,
26
26
],
27
- "cflags_cc" : [
28
- "-std=c++17"
29
- ],
30
27
"conditions" : [
31
28
["OS=='mac'" , {
32
29
"xcode_settings" : {
33
30
"GCC_SYMBOLS_PRIVATE_EXTERN" : "YES" , # -fvisibility=hidden
34
- "CLANG_CXX_LANGUAGE_STANDARD" : "c++17 " ,
31
+ "CLANG_CXX_LANGUAGE_STANDARD" : "<(cxxstd) " ,
35
32
"MACOSX_DEPLOYMENT_TARGET" : "10.9" ,
36
33
},
37
34
}],
38
35
["OS=='win'" , {
39
36
"msvs_settings" : {
40
37
"VCCLCompilerTool" : {
41
38
"AdditionalOptions" : [
42
- "/std:c++17 " ,
39
+ "/std:<(cxxstd) " ,
43
40
],
44
41
"RuntimeLibrary" : 0 ,
45
42
},
46
43
},
47
44
}],
48
45
["OS == 'linux'" , {
49
46
"cflags_cc" : [
50
- "-Wno-cast-function-type"
47
+ "-std=<(cxxstd)" ,
48
+ "-fvisibility=hidden" ,
49
+ "-Wno-cast-function-type" ,
51
50
]
52
51
}],
53
52
]
62
61
"vendor/tree-sitter/lib/src" ,
63
62
"vendor/tree-sitter/lib/include" ,
64
63
],
65
- "cflags" : [
66
- "-std=c11"
67
- ],
68
64
"defines" : [
69
65
"_POSIX_C_SOURCE=200112L" ,
70
66
"_DEFAULT_SOURCE" ,
71
- ]
67
+ ],
68
+ "conditions" : [
69
+ ["OS!='win'" , {
70
+ "cflags_c" : [
71
+ "-std=c11" ,
72
+ ],
73
+ }, { # OS == "win"
74
+ "cflags_c" : [
75
+ "/std:c11" ,
76
+ ],
77
+ }],
78
+ ],
72
79
}
73
80
],
74
81
"variables" : {
75
82
"runtime%" : "node" ,
76
83
"openssl_fips" : "" ,
77
84
"v8_enable_pointer_compression%" : 0 ,
78
85
"v8_enable_31bit_smis_on_64bit_arch%" : 0 ,
86
+ "cxxstd%" : "<!(node -p \" parseInt(process.env.npm_config_target ?? process.versions.node) > 22 ? 'c++20' : 'c++17'\" )" ,
79
87
}
80
88
}
You can’t perform that action at this time.
0 commit comments