Skip to content

Commit

Permalink
build: use local node-gyp for benchmark addon
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bnoordhuis authored and targos committed Oct 18, 2017
1 parent 5629351 commit c032b5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ test-valgrind: all
test-check-deopts: all
$(PYTHON) tools/test.py --mode=release --check-deopts parallel sequential -J

benchmark/misc/function_call/build/Release/binding.node: all \
benchmark/misc/function_call/binding.cc \
benchmark/misc/function_call/binding.gyp
$(NODE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
--python="$(PYTHON)" \
--directory="$(shell pwd)/benchmark/misc/function_call" \
--nodedir="$(shell pwd)"

# Implicitly depends on $(NODE_EXE). We don't depend on it explicitly because
# it always triggers a rebuild due to it being a .PHONY rule. See the comment
# near the build-addons rule for more background.
Expand Down Expand Up @@ -904,8 +912,7 @@ bench-http: all
bench-fs: all
@$(NODE) benchmark/run.js fs

bench-misc: all
@$(MAKE) -C benchmark/misc/function_call/
bench-misc: benchmark/misc/function_call/build/Release/binding.node
@$(NODE) benchmark/run.js misc

bench-array: all
Expand Down
2 changes: 0 additions & 2 deletions benchmark/misc/function_call/Makefile

This file was deleted.

0 comments on commit c032b5f

Please sign in to comment.