Skip to content

Commit

Permalink
bin:Copy debug info to a separate folder
Browse files Browse the repository at this point in the history
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
  • Loading branch information
anjiahao1 authored and xiaoxiang781216 committed Nov 22, 2024
1 parent 7fb7e21 commit 3cbcbb6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
.kconfig
*.lock
/bin
/bin_debug
/boot_romfsimg.h
/external
/Kconfig
Expand Down
4 changes: 3 additions & 1 deletion Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ $(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ) $(MAINDOBJ)
$(Q) mkdir -p $(BINDIR)
$(call ELFLD, $(PROGOBJ_$@), $(call CONVERT_PATH,$@))
$(Q) chmod +x $@
ifneq ($(CONFIG_DEBUG_SYMBOLS),y)
ifneq ($(CONFIG_DEBUG_SYMBOLS),)
$(Q) mkdir -p $(BINDIR_DEBUG)
$(Q) cp $@ $(BINDIR_DEBUG)
$(Q) $(MODULESTRIP) $@
endif

Expand Down
3 changes: 2 additions & 1 deletion Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ LIBPATH ?= $(TOPDIR)$(DELIM)staging
# The install path

BINDIR ?= $(APPDIR)$(DELIM)bin
BINDIR_DEBUG ?= $(APPDIR)$(DELIM)bin_debug

# The final build target

Expand Down Expand Up @@ -184,4 +185,4 @@ define CLEANAROBJS
$(shell rm -rf $(CLEAN_OBJS_$(BATCH))))
$(eval OBJS :=)
endef
endif
endif
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ clean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_clean)
$(call DELFILE, $(BIN))
$(call DELFILE, Kconfig)
$(call DELDIR, $(BINDIR))
$(call DELDIR, $(BINDIR_DEBUG))
$(call CLEAN)

distclean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_distclean)
Expand Down

0 comments on commit 3cbcbb6

Please sign in to comment.