From c032b5ffe700d5a1bd4b4d9eec4a8278e3e70eeb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 12 Oct 2017 12:04:02 +0200 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/16160 Fixes: https://github.com/nodejs/node/issues/16154 Reviewed-By: Joyee Cheung Reviewed-By: Franziska Hinkelmann --- Makefile | 11 +++++++++-- benchmark/misc/function_call/Makefile | 2 -- 2 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 benchmark/misc/function_call/Makefile diff --git a/Makefile b/Makefile index 84b4e2c35c35a7..755542eb071647 100644 --- a/Makefile +++ b/Makefile @@ -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. @@ -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 diff --git a/benchmark/misc/function_call/Makefile b/benchmark/misc/function_call/Makefile deleted file mode 100644 index 9dc1f30329dfaf..00000000000000 --- a/benchmark/misc/function_call/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -binding: - node-gyp rebuild --nodedir=../../..