aboutsummaryrefslogtreecommitdiff
path: root/Makefile.common
diff options
context:
space:
mode:
authorColin Snover2017-11-01 17:15:35 -0500
committerEugene Sandulenko2018-08-18 13:33:03 +0200
commitffff95368531b7a9be392c3eec1f7f054fc01c86 (patch)
tree1720e6c464e958a51b0a2316bcb7e77697f59701 /Makefile.common
parent7557f17ed28c7be07be470e65a051858d3b56c0e (diff)
downloadscummvm-rg350-ffff95368531b7a9be392c3eec1f7f054fc01c86.tar.gz
scummvm-rg350-ffff95368531b7a9be392c3eec1f7f054fc01c86.tar.bz2
scummvm-rg350-ffff95368531b7a9be392c3eec1f7f054fc01c86.zip
BUILD: Use split-dwarf debug symbol files by default, when available
This should improve linker time as well as reduce the size of the built binaries (though this does not affect runtime memory usage since the debug segments are not loaded into memory except by a debugger) whilst still giving debug information.
Diffstat (limited to 'Makefile.common')
-rw-r--r--Makefile.common12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.common b/Makefile.common
index fa377a000e..b08c464656 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -8,6 +8,9 @@
all: $(EXECUTABLE) plugins
+ifdef SPLIT_DWARF
+all: $(EXECUTABLE).dwp
+endif
######################################################################
# Module settings
@@ -70,6 +73,7 @@ QUIET_AR = @echo ' ' AR ' ' $@;
QUIET_RANLIB = @echo ' ' RANLIB ' ' $@;
QUIET_PLUGIN = @echo ' ' PLUGIN ' ' $@;
QUIET_LINK = @echo ' ' LINK ' ' $@;
+QUIET_DWP = @echo ' ' DWP ' ' $@;
QUIET_WINDRES = @echo ' ' WINDRES '' $@;
QUIET = @
endif
@@ -80,12 +84,20 @@ endif
$(EXECUTABLE): $(OBJS)
$(QUIET_LINK)$(LD) $(LDFLAGS) $(PRE_OBJS_FLAGS) $+ $(POST_OBJS_FLAGS) $(LIBS) -o $@
+ifdef SPLIT_DWARF
+$(EXECUTABLE).dwp: $(EXECUTABLE)
+ $(QUIET_DWP)$(DWP) -e $(EXECUTABLE)
+endif
+
distclean: clean clean-devtools
$(RM) config.h config.mk config.log engines/engines.mk engines/plugins_table.h
clean:
$(RM_REC) $(DEPDIRS)
$(RM) $(OBJS) $(EXECUTABLE)
+ifdef SPLIT_DWARF
+ $(RM) $(EXECUTABLE).dwp
+endif
#