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