From: Clifford Wolf Date: Mon, 27 Aug 2018 11:27:05 +0000 (+0200) Subject: Add ENABLE_GCOV build option X-Git-Tag: yosys-0.8~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e845bd25460d7b8287cf3ea5147040689940f49;p=yosys.git Add ENABLE_GCOV build option Signed-off-by: Clifford Wolf --- diff --git a/Makefile b/Makefile index 18bf303b1..7eb3971f7 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ ENABLE_LIBYOSYS := 0 ENABLE_PROTOBUF := 0 # other configuration flags +ENABLE_GCOV := 0 ENABLE_GPROF := 0 ENABLE_DEBUG := 0 ENABLE_NDEBUG := 0 @@ -312,6 +313,11 @@ endif endif endif +ifeq ($(ENABLE_GCOV),1) +CXXFLAGS += --coverage +LDFLAGS += --coverage +endif + ifeq ($(ENABLE_GPROF),1) CXXFLAGS += -pg LDFLAGS += -pg @@ -709,6 +715,11 @@ config-msys2: clean config-msys2-64: clean echo 'CONFIG := msys2-64' > Makefile.conf +config-gcov: clean + echo 'CONFIG := gcc' > Makefile.conf + echo 'ENABLE_GCOV := 1' >> Makefile.conf + echo 'ENABLE_DEBUG := 1' >> Makefile.conf + config-gprof: clean echo 'CONFIG := gcc' > Makefile.conf echo 'ENABLE_GPROF := 1' >> Makefile.conf