From 80f7919777d4f03e94cf89305eb6d98aee247982 Mon Sep 17 00:00:00 2001 From: Tomas Guerra <54514587+GAtom22@users.noreply.github.com> Date: Wed, 21 Dec 2022 10:19:05 -0300 Subject: [PATCH] debug(app): add flag to disable optimized build for remote debugging (#1549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index e9cc56637a..c20325163c 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,12 @@ ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS))) BUILD_FLAGS += -trimpath endif +# check if no optimization option is passed +# used for remote debugging +ifneq (,$(findstring nooptimization,$(COSMOS_BUILD_OPTIONS))) + BUILD_FLAGS += -gcflags "all=-N -l" +endif + # # The below include contains the tools and runsim targets. # include contrib/devtools/Makefile