py/mkrules.mk: Don't strip binary if STRIP variable is unset.

This provides a way to build a non-DEBUG host binary that still has symbols
and debug information.

Document this for the unix port, and update a comment in the unix port
Makefile.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2023-09-20 17:29:12 +10:00
committed by Damien George
parent 58f63497e5
commit 2fcd28f713
3 changed files with 18 additions and 2 deletions

View File

@@ -212,7 +212,9 @@ $(BUILD)/$(PROG): $(OBJ)
# we may want to compile using Thumb, but link with non-Thumb libc.
$(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
ifndef DEBUG
ifdef STRIP
$(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $@
endif
endif
$(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $@