Skip to content

Commit c032b5f

Browse files
bnoordhuistargos
authored andcommitted
build: use local node-gyp for benchmark addon
Move the logic for building the benchmark/misc/function_call to the top-level Makefile and use our local copy of node-gyp. PR-URL: #16160 Fixes: #16154 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent 5629351 commit c032b5f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ test-valgrind: all
227227
test-check-deopts: all
228228
$(PYTHON) tools/test.py --mode=release --check-deopts parallel sequential -J
229229

230+
benchmark/misc/function_call/build/Release/binding.node: all \
231+
benchmark/misc/function_call/binding.cc \
232+
benchmark/misc/function_call/binding.gyp
233+
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
234+
--python="$(PYTHON)" \
235+
--directory="$(shell pwd)/benchmark/misc/function_call" \
236+
--nodedir="$(shell pwd)"
237+
230238
# Implicitly depends on $(NODE_EXE). We don't depend on it explicitly because
231239
# it always triggers a rebuild due to it being a .PHONY rule. See the comment
232240
# near the build-addons rule for more background.
@@ -904,8 +912,7 @@ bench-http: all
904912
bench-fs: all
905913
@$(NODE) benchmark/run.js fs
906914

907-
bench-misc: all
908-
@$(MAKE) -C benchmark/misc/function_call/
915+
bench-misc: benchmark/misc/function_call/build/Release/binding.node
909916
@$(NODE) benchmark/run.js misc
910917

911918
bench-array: all

benchmark/misc/function_call/Makefile

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)