Skip to content

Commit 1a7da79

Browse files
committed
build: include minimal V8 headers in distribution
Instead of specifically excluding v8-inspector, only include `v8.h`, its dependencies, and `v8-platform.h` (used in `node.h`)
1 parent 1e34df1 commit 1a7da79

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tools/install.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,16 @@ def files(action):
157157
headers(action)
158158

159159
def headers(action):
160-
def ignore_inspector_headers(files_arg, dest):
161-
inspector_headers = [
162-
'deps/v8/include/v8-inspector.h',
163-
'deps/v8/include/v8-inspector-protocol.h'
160+
def wanted_v8_headers(files_arg, dest):
161+
v8_headers = [
162+
'deps/v8/include/cppgc/common.h',
163+
'deps/v8/include/v8.h',
164+
'deps/v8/include/v8-internal.h',
165+
'deps/v8/include/v8-platform.h',
166+
'deps/v8/include/v8-version.h',
167+
'deps/v8/include/v8config.h',
164168
]
165-
files_arg = [name for name in files_arg if name not in inspector_headers]
169+
files_arg = [name for name in files_arg if name in v8_headers]
166170
action(files_arg, dest)
167171

168172
action([
@@ -182,7 +186,7 @@ def ignore_inspector_headers(files_arg, dest):
182186
if sys.platform.startswith('aix'):
183187
action(['out/Release/node.exp'], 'include/node/')
184188

185-
subdir_files('deps/v8/include', 'include/node/', ignore_inspector_headers)
189+
subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers)
186190

187191
if 'false' == variables.get('node_shared_libuv'):
188192
subdir_files('deps/uv/include', 'include/node/', action)

0 commit comments

Comments
 (0)