Skip to content

Commit 84c7dc8

Browse files
committed
Align tree-sitter C++ standard patch
1 parent 4b4e8af commit 84c7dc8

2 files changed

Lines changed: 32 additions & 14 deletions

File tree

patches/tree-sitter@0.25.0.patch

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,47 @@
11
diff --git a/binding.gyp b/binding.gyp
2-
index bb40aa7e8d41644ba690761e9064fc1d0f2dcd6b..1e1641b2e3d6733642ea0ff06cd88b3b3023fd6c 100644
2+
index bb40aa7e8d41644ba690761e9064fc1d0f2dcd6b..724b177f43bf6ed7cf60add3f23317be2018f6ff 100644
33
--- a/binding.gyp
44
+++ b/binding.gyp
5-
@@ -25,13 +25,13 @@
5+
@@ -24,14 +24,11 @@
6+
"defines": [
67
"NAPI_VERSION=<(napi_build_version)",
78
],
8-
"cflags_cc": [
9+
- "cflags_cc": [
910
- "-std=c++17"
10-
+ "-std=c++20"
11-
],
11+
- ],
1212
"conditions": [
1313
["OS=='mac'", {
1414
"xcode_settings": {
1515
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden
1616
- "CLANG_CXX_LANGUAGE_STANDARD": "c++17",
17-
+ "CLANG_CXX_LANGUAGE_STANDARD": "c++20",
17+
+ "CLANG_CXX_LANGUAGE_STANDARD": "<(cxxstd)",
1818
"MACOSX_DEPLOYMENT_TARGET": "10.9",
1919
},
2020
}],
21-
@@ -39,7 +39,7 @@
21+
@@ -39,15 +36,17 @@
2222
"msvs_settings": {
2323
"VCCLCompilerTool": {
2424
"AdditionalOptions": [
2525
- "/std:c++17",
26-
+ "/std:c++20",
26+
+ "/std:<(cxxstd)",
2727
],
2828
"RuntimeLibrary": 0,
2929
},
30+
},
31+
}],
32+
["OS == 'linux'", {
33+
"cflags_cc": [
34+
- "-Wno-cast-function-type"
35+
+ "-std=<(cxxstd)",
36+
+ "-fvisibility=hidden",
37+
+ "-Wno-cast-function-type",
38+
]
39+
}],
40+
]
41+
@@ -75,5 +74,6 @@
42+
"openssl_fips": "",
43+
"v8_enable_pointer_compression%": 0,
44+
"v8_enable_31bit_smis_on_64bit_arch%": 0,
45+
+ "cxxstd%": "<!(node -p \"parseInt(process.env.npm_config_target ?? process.versions.node) < 22 ? 'c++17' : 'c++20'\")",
46+
}
47+
}

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)