aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.guix-dev3
-rw-r--r--Makefile6
2 files changed, 6 insertions, 3 deletions
diff --git a/.guix-dev b/.guix-dev
index e33dd0a..a052228 100644
--- a/.guix-dev
+++ b/.guix-dev
@@ -1,2 +1,3 @@
# Typical Guix container invocation
-~/opt/guix/bin/guix environment -C guix --ad-hoc gcc-toolchain gdb gsl openblas zlib bash ld-wrapper perl vim which
+~/opt/guix/bin/guix environment -C guix --ad-hoc gcc-toolchain gdb gsl openblas zlib bash ld-wrapper perl vim which gperftools
+
diff --git a/Makefile b/Makefile
index 0cf3097..fd0e55b 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,7 @@ endif
debug check fast-check: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
-profile: CPPFLAGS += -pg
+profile: CPPFLAGS += -g $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
release: CPPFLAGS += -DNDEBUG -O3 $(GCC_FLAGS) $(GSL_INCLUDE_PATH) -Icontrib/catch-1.9.7 -Isrc
@@ -181,6 +181,8 @@ ifdef EXTRA_FLAGS
LIBS += $(EXTRA_FLAGS)
endif
+profile: LIBS += -Wl,--no-as-needed -lprofiler -Wl,--as-needed
+
.PHONY: all test
OUTPUT = $(BIN_DIR)/gemma
@@ -213,7 +215,7 @@ release: $(OUTPUT)
static: $(OUTPUT)
-debug: $(OUTPUT)
+debug profile: $(OUTPUT)
./src/version.h: ./VERSION
$(shell bash $(VGEN) $(GUIX_PROFILE) > src/version.h)