Skip to content

Commit 1be6fb9

Browse files
danbevrvagg
authored andcommitted
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: #22207 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Jon Moss <[email protected]>
1 parent 2737b46 commit 1be6fb9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,17 @@ $(NODE_G_EXE): config.gypi out/Makefile
9494
CODE_CACHE_DIR ?= out/$(BUILDTYPE)/obj/gen
9595
CODE_CACHE_FILE ?= $(CODE_CACHE_DIR)/node_code_cache.cc
9696

97+
ifeq ($(BUILDTYPE),Debug)
98+
CONFIG_FLAGS += --debug
99+
endif
97100
.PHONY: with-code-cache
98101
with-code-cache:
99-
$(PYTHON) ./configure
102+
@echo $(CONFIG_FLAGS)
103+
$(PYTHON) ./configure $(CONFIG_FLAGS)
100104
$(MAKE)
101105
mkdir -p $(CODE_CACHE_DIR)
102106
out/$(BUILDTYPE)/$(NODE_EXE) --expose-internals tools/generate_code_cache.js $(CODE_CACHE_FILE)
103-
$(PYTHON) ./configure --code-cache-path $(CODE_CACHE_FILE)
107+
$(PYTHON) ./configure --code-cache-path $(CODE_CACHE_FILE) $(CONFIG_FLAGS)
104108
$(MAKE)
105109

106110
.PHONY: test-code-cache

0 commit comments

Comments
 (0)