From: Clifford Wolf Date: Wed, 25 Oct 2017 12:57:16 +0000 (+0200) Subject: Add ENABLE_DEBUG config flag X-Git-Tag: yosys-0.8~284 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a038861c882d628cf9bb1d9c3e8ce0525f6c49a;p=yosys.git Add ENABLE_DEBUG config flag --- diff --git a/Makefile b/Makefile index 54e03eb78..eb8f0f594 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ ENABLE_LIBYOSYS := 0 # other configuration flags ENABLE_GPROF := 0 +ENABLE_DEBUG := 0 ENABLE_NDEBUG := 0 LINK_CURSES := 0 LINK_TERMCAP := 0 @@ -251,7 +252,15 @@ LDFLAGS += -pg endif ifeq ($(ENABLE_NDEBUG),1) -CXXFLAGS := -O3 -DNDEBUG $(filter-out -Os,$(CXXFLAGS)) +CXXFLAGS := -O3 -DNDEBUG $(filter-out -Os -ggdb,$(CXXFLAGS)) +endif + +ifeq ($(ENABLE_DEBUG),1) +ifeq ($(CONFIG),clang) +CXXFLAGS := -O0 $(filter-out -Os,$(CXXFLAGS)) +else +CXXFLAGS := -Og $(filter-out -Os,$(CXXFLAGS)) +endif endif ifeq ($(ENABLE_ABC),1)