Bug 1175857 - Build libraries composing dump_syms with optimization. r=glandium draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 15 Oct 2015 15:16:25 -0700
changeset 301191 177c2733f3a847487ed6b4ee7516fcc0ef5517da
parent 301084 e193b4da0a8c1025aa76a403c64663ff1cd41709
child 510200 8441467c9b0fb1cc0246b728db86711f51764a1f
push id6419
push usercmanchester@mozilla.com
push dateThu, 15 Oct 2015 22:17:14 +0000
reviewersglandium
bugs1175857
milestone44.0a1
Bug 1175857 - Build libraries composing dump_syms with optimization. r=glandium A previous patch enabled optimizations when building the dump_syms executable. This patch enables optimizations when building dependent libraries, where much of the work is actually done, to achieve the expected speeedup.
toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
toolkit/crashreporter/google-breakpad/src/common/moz.build
toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/moz.build
@@ -7,16 +7,20 @@
 if CONFIG['MOZ_CRASHREPORTER']:
     HostLibrary('host_breakpad_dwarf_s')
     HOST_SOURCES += [
         'bytereader.cc',
         'dwarf2diehandler.cc',
         'dwarf2reader.cc',
         'functioninfo.cc',
     ]
+    HOST_CXXFLAGS += [
+        '-O2',
+        '-g',
+    ]
     LOCAL_INCLUDES += [
         '../..',
     ]
 
 # need static lib
 FORCE_STATIC_LIB = True
 
 # This code is only compiled for build-time tools,
--- a/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/linux/moz.build
@@ -28,16 +28,20 @@ if CONFIG['MOZ_CRASHREPORTER']:
         'dump_symbols.cc',
         'elf_symbols_to_module.cc',
         'elfutils.cc',
         'file_id.cc',
         'guid_creator.cc',
         'linux_libc_support.cc',
         'memory_mapped_file.cc',
     ]
+    HOST_CXXFLAGS += [
+        '-O2',
+        '-g',
+    ]
 
 Library('breakpad_linux_common_s')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     DEFINES['ELFSIZE'] = 32
 
--- a/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/mac/moz.build
@@ -21,16 +21,20 @@ if CONFIG['HOST_OS_ARCH'] != 'Darwin':
 # This is a little weird, but we're building a host and a target lib here.
 # The host lib is used for dump_syms, and the target lib for the
 # crash reporter client.  Therefore, we don't need all the srcs in both.
 if CONFIG['MOZ_CRASHREPORTER']:
     HOST_SOURCES += UNIFIED_SOURCES
     HOST_SOURCES += [
         'dump_syms.cc',
     ]
+    HOST_CXXFLAGS += [
+        '-O2',
+        '-g',
+    ]
     HostLibrary('host_breakpad_mac_common_s')
 
 SOURCES += [
     'bootstrap_compat.cc',
     'HTTPMultipartUpload.m',
     'MachIPC.mm',
     'string_utilities.cc',
 ]
--- a/toolkit/crashreporter/google-breakpad/src/common/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/moz.build
@@ -62,16 +62,20 @@ if CONFIG['OS_ARCH'] != 'WINNT' and CONF
         'md5.cc',
         'module.cc',
         'pathname_stripper.cc',
         'stabs_reader.cc',
         'stabs_to_module.cc',
         'string_conversion.cc',
         'unique_string.cc',
     ]
+    HOST_CXXFLAGS += [
+        '-O2',
+        '-g',
+    ]
     HostLibrary('host_breakpad_common_s')
 
 if CONFIG['OS_ARCH'] == 'Darwin':
     UNIFIED_SOURCES += [
         'mac/dump_syms.cc',
     ]
     HOST_DEFINES['HAVE_MACH_O_NLIST_H'] = True
     DEFINES['HAVE_MACH_O_NLIST_H'] = True
--- a/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
+++ b/toolkit/crashreporter/google-breakpad/src/common/solaris/moz.build
@@ -16,15 +16,19 @@ Library('breakpad_solaris_common_s')
 
 # not compiling http_upload.cc currently
 # since it depends on libcurl
 HOST_SOURCES += [
     'dump_symbols.cc',
     'file_id.cc',
     'guid_creator.cc',
 ]
+HOST_CXXFLAGS += [
+    '-O2',
+    '-g',
+]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../..',
 ]