add DEVFLAGS for performance testing

This commit is contained in:
Damien Elmes 2020-03-06 09:33:53 +10:00
parent 0f4c3ab611
commit f904f30bb2
3 changed files with 11 additions and 5 deletions

View file

@ -34,6 +34,7 @@ SUBMAKE := $(MAKE) --print-directory
.SUFFIXES: .SUFFIXES:
BUILDFLAGS := --release --strip BUILDFLAGS := --release --strip
DEVFLAGS :=
RUNFLAGS := RUNFLAGS :=
CHECKABLE_PY := pylib qt CHECKABLE_PY := pylib qt
CHECKABLE_RS := rslib CHECKABLE_RS := rslib
@ -66,7 +67,7 @@ develop: pyenv buildhash prepare
@set -eo pipefail && \ @set -eo pipefail && \
. "${ACTIVATE_SCRIPT}" && \ . "${ACTIVATE_SCRIPT}" && \
for dir in $(DEVEL); do \ for dir in $(DEVEL); do \
$(SUBMAKE) -C $$dir develop BUILDFLAGS="$(BUILDFLAGS)"; \ $(SUBMAKE) -C $$dir develop DEVFLAGS="$(DEVFLAGS)"; \
done done
.PHONY: run .PHONY: run

View file

@ -64,9 +64,13 @@ Use 'make clean' to remove some generated files.
Performance Performance
------------ ------------
'make run' builds the Rust libraries in unoptimized debug mode. Before doing 'make run' builds the Rust libraries in unoptimized debug mode by default.
any performance testing, please make sure you make a release build with Before doing any performance testing, please make sure you make a release
'make build', and install the resulting .whl files with pip. build with 'make build' and install the resulting .whl files, or use
make run with the following command:
touch rspy/src/lib.rs
make run DEVFLAGS="--release --strip"
PyQt PyQt
----- -----

View file

@ -24,6 +24,7 @@ $(shell mkdir -p .build ../dist)
OUTDIR := ../dist OUTDIR := ../dist
BUILDFLAGS := --release --strip BUILDFLAGS := --release --strip
DEVFLAGS :=
RSPY_TARGET_DIR ?= target RSPY_TARGET_DIR ?= target
QT_FTL_TEMPLATES := ../qt/ftl QT_FTL_TEMPLATES := ../qt/ftl
@ -45,7 +46,7 @@ DEPS := .build/tools .build/vernum ../meta/buildhash \
.build/develop: $(DEPS) .build/develop: $(DEPS)
touch ../proto/backend.proto touch ../proto/backend.proto
FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \ FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop $(DEVFLAGS)
touch $@ touch $@
build: $(DEPS) build: $(DEPS)