Skip to content

Commit

Permalink
build: add CONFIG_FLAGS to with-code-cache target
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danbev committed Aug 10, 2018
1 parent 346f2a7 commit 2345a6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2345a6c

Please sign in to comment.