Skip to content

Commit dcecc5d

Browse files
committed
fixup! src: implement JavaScript API
1 parent ff4d1de commit dcecc5d

File tree

1 file changed

+51
-38
lines changed

1 file changed

+51
-38
lines changed

binding.gyp

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
[ "OS == 'win'", {
5656
"sources": [
5757
"<(lldb_include_dir)/../source/Host/common/GetOptInc.cpp",
58-
"windows/llnode.def",
5958
],
6059
"include_dirs": [
6160
"windows/include",
@@ -78,48 +77,62 @@
7877
"src/llv8-constants.cc",
7978
"src/llscan.cc",
8079
"src/node-constants.cc",
81-
]
82-
}, {
83-
"target_name": "addon",
84-
"type": "loadable_module",
85-
"include_dirs": [
86-
"<!@(node -p \"require('node-addon-api').include\")"
8780
],
88-
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
89-
"sources": [
90-
"src/addon.cc",
91-
"src/llnode_module.cc",
92-
"src/llnode_api.cc",
93-
"src/constants.cc",
94-
"src/error.cc",
95-
"src/llv8.cc",
96-
"src/llv8-constants.cc",
97-
"src/llscan.cc",
98-
"src/node-constants.cc",
99-
],
100-
"cflags!": [ "-fno-exceptions" ],
101-
"cflags_cc!": [ "-fno-exceptions" ],
10281
"conditions": [
103-
[ "OS=='linux' or OS=='freebsd'", {
82+
[ "OS == 'win'", {
83+
"sources": [
84+
"windows/llnode.def",
85+
],
86+
}]
87+
]
88+
}],
89+
90+
"conditions": [
91+
# Does not support addons on Windows for now
92+
[ "OS != 'win'", {
93+
"targets": [{
94+
"target_name": "addon",
95+
"type": "loadable_module",
96+
"include_dirs": [
97+
"<!@(node -p \"require('node-addon-api').include\")"
98+
],
99+
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
100+
"sources": [
101+
"src/addon.cc",
102+
"src/llnode_module.cc",
103+
"src/llnode_api.cc",
104+
"src/constants.cc",
105+
"src/error.cc",
106+
"src/llv8.cc",
107+
"src/llv8-constants.cc",
108+
"src/llscan.cc",
109+
"src/node-constants.cc",
110+
],
111+
"cflags!": [ "-fno-exceptions" ],
112+
"cflags_cc!": [ "-fno-exceptions" ],
104113
"conditions": [
105-
# If we could not locate the lib dir, then we will have to search
106-
# from the global search paths during linking and at runtime
107-
[ "lldb_lib_dir != ''", {
108-
"ldflags": [
109-
"-L<(lldb_lib_dir)",
110-
"-Wl,-rpath,<(lldb_lib_dir)"
114+
[ "OS=='linux' or OS=='freebsd'", {
115+
"conditions": [
116+
# If we could not locate the lib dir, then we will have to search
117+
# from the global search paths during linking and at runtime
118+
[ "lldb_lib_dir != ''", {
119+
"ldflags": [
120+
"-L<(lldb_lib_dir)",
121+
"-Wl,-rpath,<(lldb_lib_dir)"
122+
]
123+
}],
124+
# If we cannot find a non-versioned library liblldb(-x.y).so,
125+
# then we will have to link to the versioned library
126+
# liblldb(-x.y).so.z loaded by the detected lldb executable
127+
[ "lldb_lib_so != ''", {
128+
"libraries": ["<(lldb_lib_so)"]
129+
}, {
130+
"libraries": ["-l<(lldb_lib)"]
131+
}]
111132
]
112-
}],
113-
# If we cannot find a non-versioned library liblldb(-x.y).so,
114-
# then we will have to link to the versioned library
115-
# liblldb(-x.y).so.z loaded by the detected lldb executable
116-
[ "lldb_lib_so != ''", {
117-
"libraries": ["<(lldb_lib_so)"]
118-
}, {
119-
"libraries": ["-l<(lldb_lib)"]
120133
}]
121134
]
122135
}]
123-
]
124-
}],
136+
}],
137+
]
125138
}

0 commit comments

Comments
 (0)