forked from tree-sitter/node-tree-sitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
79 lines (79 loc) · 1.84 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"targets": [
{
"target_name": "tree_sitter_runtime_binding",
"dependencies": [
"tree_sitter",
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
],
"sources": [
"src/binding.cc",
"src/conversions.cc",
"src/language.cc",
"src/logger.cc",
"src/lookaheaditerator.cc",
"src/node.cc",
"src/parser.cc",
"src/query.cc",
"src/tree.cc",
"src/tree_cursor.cc",
],
"include_dirs": [
"vendor/tree-sitter/lib/include",
],
"defines": [
"NAPI_VERSION=<(napi_build_version)",
],
"cflags": [
"-std=c++17"
],
"cflags_cc": [
"-std=c++17"
],
"conditions": [
["OS=='mac'", {
"xcode_settings": {
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES", # -fvisibility=hidden
"CLANG_CXX_LANGUAGE_STANDARD": "c++17",
"MACOSX_DEPLOYMENT_TARGET": "10.9",
},
}],
["OS=='win'", {
"msvs_settings": {
"VCCLCompilerTool": {
"AdditionalOptions": [
"/std:c++17",
],
"RuntimeLibrary": 0,
},
},
}],
["OS == 'linux'", {
"cflags_cc": [
"-Wno-cast-function-type"
]
}],
]
},
{
"target_name": "tree_sitter",
"type": "static_library",
"sources": [
"vendor/tree-sitter/lib/src/lib.c"
],
"include_dirs": [
"vendor/tree-sitter/lib/src",
"vendor/tree-sitter/lib/include",
],
"cflags": [
"-std=c11"
]
}
],
"variables": {
"runtime%": "node",
"openssl_fips": "",
"v8_enable_pointer_compression%": 0,
"v8_enable_31bit_smis_on_64bit_arch%": 0,
}
}