diff --git a/Makefile.in b/Makefile.in index 34a17d842ad7..65ef90d3a766 100644 --- a/Makefile.in +++ b/Makefile.in @@ -162,16 +162,16 @@ endif ifeq ($(OS_ARCH),Darwin) # need to pass arch flags for universal builds ifdef UNIVERSAL_BINARY -MAKE_SYM_STORE_ARGS := -a "ppc i386" --vcs-info +MAKE_SYM_STORE_ARGS := -c -a "ppc i386" --vcs-info MAKE_SYM_STORE_PATH := $(DIST)/universal else -MAKE_SYM_STORE_ARGS := -a $(OS_TEST) --vcs-info +MAKE_SYM_STORE_ARGS := -c -a $(OS_TEST) --vcs-info MAKE_SYM_STORE_PATH := $(DIST)/bin endif DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms endif ifeq (,$(filter-out Linux SunOS,$(OS_ARCH))) -MAKE_SYM_STORE_ARGS := --vcs-info +MAKE_SYM_STORE_ARGS := -c --vcs-info DUMP_SYMS_BIN ?= $(DIST)/host/bin/dump_syms MAKE_SYM_STORE_PATH := $(DIST)/bin endif diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py index 32ce2a414e0e..eff0f497e2b3 100755 --- a/toolkit/crashreporter/tools/symbolstore.py +++ b/toolkit/crashreporter/tools/symbolstore.py @@ -708,10 +708,27 @@ class Dumper_Mac(Dumper): os.system("dsymutil %s %s >/dev/null" % (' '.join([a.replace('-a ', '--arch=') for a in self.archs]), file)) res = Dumper.ProcessFile(self, dsymbundle) - if not self.copy_debug: - shutil.rmtree(dsymbundle) + # CopyDebug will already have been run from Dumper.ProcessFile + shutil.rmtree(dsymbundle) return res + def CopyDebug(self, file, debug_file, guid): + """ProcessFile has already produced a dSYM bundle, so we should just + copy that to the destination directory. However, we'll package it + into a .tar.bz2 because the debug symbols are pretty huge, and + also because it's a bundle, so it's a directory. |file| here is the + dSYM bundle, and |debug_file| is the original filename.""" + rel_path = os.path.join(debug_file, + guid, + os.path.basename(file) + ".tar.bz2") + full_path = os.path.abspath(os.path.join(self.symbol_path, + rel_path)) + success = call(["tar", "cjf", full_path, os.path.basename(file)], + cwd=os.path.dirname(file), + stdout=open("/dev/null","w"), stderr=STDOUT) + if success == 0 and os.path.exists(full_path): + print rel_path + # Entry point if called as a standalone program def main(): parser = OptionParser(usage="usage: %prog [options] ")