From 08c3f09f300ce967ebc71872fed305ceef32eef2 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 9 Aug 2018 12:22:07 +0200 Subject: [PATCH] build: add CONFIG_FLAGS to with-code-cache target This commit adds CONFIG_FLAGS to allow the with-code-cache target to be used with a debug build. The motivation for this is to make it easier to debug a build with the code cache enabled. The suggested usage: $ make BUILDTYPE=Debug with-code-cache The BUILDTYPE option is not needed if ./configure was already configured with --debug. PR-URL: https://github.com/nodejs/node/pull/22207 Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung Reviewed-By: Refael Ackermann Reviewed-By: Jon Moss --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 525e28e5efbb10..e769a6e574d6fc 100644 --- a/Makefile +++ b/Makefile @@ -94,13 +94,17 @@ $(NODE_G_EXE): config.gypi out/Makefile CODE_CACHE_DIR ?= out/$(BUILDTYPE)/obj/gen CODE_CACHE_FILE ?= $(CODE_CACHE_DIR)/node_code_cache.cc +ifeq ($(BUILDTYPE),Debug) +CONFIG_FLAGS += --debug +endif .PHONY: with-code-cache with-code-cache: - $(PYTHON) ./configure + @echo $(CONFIG_FLAGS) + $(PYTHON) ./configure $(CONFIG_FLAGS) $(MAKE) mkdir -p $(CODE_CACHE_DIR) out/$(BUILDTYPE)/$(NODE_EXE) --expose-internals tools/generate_code_cache.js $(CODE_CACHE_FILE) - $(PYTHON) ./configure --code-cache-path $(CODE_CACHE_FILE) + $(PYTHON) ./configure --code-cache-path $(CODE_CACHE_FILE) $(CONFIG_FLAGS) $(MAKE) .PHONY: test-code-cache