Skip to content

Commit 9936d45

Browse files
committed
build: build opt to set local location of headers
Some linux distroes install headers through their package managers. When headers are locally installed we'd like them to be used. Add a build time configuration option --use-prefix-to-find-headers that will will suggest to node-gyp to look for headers based on the prefix A PR to node-gyp will use this value when building addons to automatially find and use the headers if they have been installed locally Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs/node#51525 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 7fb80e5 commit 9936d45

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configure.py

+7
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@
123123
default=None,
124124
help='force build to be considered as NOT cross compiled')
125125

126+
parser.add_argument('--use-prefix-to-find-headers',
127+
action='store_true',
128+
dest='use_prefix_to_find_headers',
129+
default=None,
130+
help='use the prefix to look for pre-installed headers')
131+
126132
parser.add_argument('--dest-os',
127133
action='store',
128134
dest='dest_os',
@@ -1252,6 +1258,7 @@ def configure_node(o):
12521258
o['variables']['debug_node'] = b(options.debug_node)
12531259
o['default_configuration'] = 'Debug' if options.debug else 'Release'
12541260
o['variables']['error_on_warn'] = b(options.error_on_warn)
1261+
o['variables']['use_prefix_to_find_headers'] = b(options.use_prefix_to_find_headers)
12551262

12561263
host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
12571264
target_arch = options.dest_cpu or host_arch

0 commit comments

Comments
 (0)