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:
BUILDFLAGS := --release --strip
DEVFLAGS :=
RUNFLAGS :=
CHECKABLE_PY := pylib qt
CHECKABLE_RS := rslib
@ -66,7 +67,7 @@ develop: pyenv buildhash prepare
@set -eo pipefail && \
. "${ACTIVATE_SCRIPT}" && \
for dir in $(DEVEL); do \
$(SUBMAKE) -C $$dir develop BUILDFLAGS="$(BUILDFLAGS)"; \
$(SUBMAKE) -C $$dir develop DEVFLAGS="$(DEVFLAGS)"; \
done
.PHONY: run

View File

@ -64,9 +64,13 @@ Use 'make clean' to remove some generated files.
Performance
------------
'make run' builds the Rust libraries in unoptimized debug mode. Before doing
any performance testing, please make sure you make a release build with
'make build', and install the resulting .whl files with pip.
'make run' builds the Rust libraries in unoptimized debug mode by default.
Before doing any performance testing, please make sure you make a release
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
-----

View File

@ -24,6 +24,7 @@ $(shell mkdir -p .build ../dist)
OUTDIR := ../dist
BUILDFLAGS := --release --strip
DEVFLAGS :=
RSPY_TARGET_DIR ?= target
QT_FTL_TEMPLATES := ../qt/ftl
@ -45,7 +46,7 @@ DEPS := .build/tools .build/vernum ../meta/buildhash \
.build/develop: $(DEPS)
touch ../proto/backend.proto
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 $@
build: $(DEPS)