summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-01 16:01:20 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-01 16:01:20 +0000
commit2470064d88c482eb60eb4d284047140cff1d54d0 (patch)
treeea4b16ba3ddbc419f5eb4dc32a8e64b9e061ad50
parent2ff645a2f0f86526d322072ad2ee2305063bcabd (diff)
downloadchromium_src-2470064d88c482eb60eb4d284047140cff1d54d0.zip
chromium_src-2470064d88c482eb60eb4d284047140cff1d54d0.tar.gz
chromium_src-2470064d88c482eb60eb4d284047140cff1d54d0.tar.bz2
Run real dsymutil to get a real .dSYM for Breakpad dump_syms. This will
allow dump_syms to access DWARF data for line numbers and other stuff, and not just public symbol table data. BUG=12776 TEST=set branding to Chrome, dsymutil should run and take forever Review URL: http://codereview.chromium.org/113999 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17316 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--breakpad/breakpad.gyp6
-rw-r--r--build/common.gypi47
-rw-r--r--chrome/chrome.gyp28
3 files changed, 54 insertions, 27 deletions
diff --git a/breakpad/breakpad.gyp b/breakpad/breakpad.gyp
index 2119204..a60c5de 100644
--- a/breakpad/breakpad.gyp
+++ b/breakpad/breakpad.gyp
@@ -10,7 +10,7 @@
[ 'OS=="mac"', {
'target_defaults': {
'include_dirs': [
- 'src/',
+ 'src',
],
'configurations': {
'Debug': {
@@ -104,6 +104,10 @@
'src/common/mac/dump_syms.mm',
'src/tools/mac/dump_syms/dump_syms_tool.mm',
],
+ 'xcode_settings': {
+ # The DWARF utilities require -funsigned-char.
+ 'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',
+ },
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
diff --git a/build/common.gypi b/build/common.gypi
index 910b990..aeedd09 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -351,6 +351,12 @@
}],
['OS=="mac"', {
'target_defaults': {
+ 'variables': {
+ # This should be 'mac_real_dsym%', but there seems to be a bug
+ # with % in variables that are intended to be set to different
+ # values in different targets, like this one.
+ 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
+ },
'mac_bundle': 0,
'xcode_settings': {
'ALWAYS_SEARCH_USER_PATHS': 'NO',
@@ -381,17 +387,38 @@
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
}],
['_type=="executable"', {
- 'postbuilds': [
- {
- 'variables': {
- # Define strip_from_xcode in a variable ending in _path so
- # that gyp understands it's a path and performs proper
- # relativization during dict merging.
- 'strip_from_xcode_path': 'mac/strip_from_xcode',
+ 'target_conditions': [
+ ['mac_real_dsym == 1', {
+ # To get a real .dSYM bundle produced by dsymutil, set the
+ # debug information format to dwarf-with-dsym. Since
+ # strip_from_xcode will not be used, set Xcode to do the
+ # stripping as well.
+ 'configurations': {
+ 'Release': {
+ 'xcode_settings': {
+ 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
+ 'DEPLOYMENT_POSTPROCESSING': 'YES',
+ 'STRIP_INSTALLED_PRODUCT': 'YES',
+ },
+ },
},
- 'postbuild_name': 'Strip If Needed',
- 'action': ['<(strip_from_xcode_path)'],
- },
+ }, { # mac_real_dsym != 1
+ # To get a fast fake .dSYM bundle, use a post-build step to
+ # produce the .dSYM and strip the executable. strip_from_xcode
+ # only operates in the Release configuration.
+ 'postbuilds': [
+ {
+ 'variables': {
+ # Define strip_from_xcode in a variable ending in _path
+ # so that gyp understands it's a path and performs proper
+ # relativization during dict merging.
+ 'strip_from_xcode_path': 'mac/strip_from_xcode',
+ },
+ 'postbuild_name': 'Strip If Needed',
+ 'action': ['<(strip_from_xcode_path)'],
+ },
+ ],
+ }],
],
}],
],
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 2be4aea..cbf8698 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2246,6 +2246,10 @@
}],
['mac_breakpad==1', {
# Only include breakpad in official builds.
+ 'variables': {
+ # A real .dSYM is needed for dump_syms to operate on.
+ 'mac_real_dsym': 1,
+ },
'dependencies': [
'../breakpad/breakpad.gyp:breakpad',
'../breakpad/breakpad.gyp:dump_syms',
@@ -2257,22 +2261,14 @@
'files': ['<(PRODUCT_DIR)/crash_inspector', '<(PRODUCT_DIR)/crash_report_sender.app'],
},
],
- 'target_conditions': [
- # We use target_conditions here that is always true to force
- # this post build to run last. This lets the strip from
- # common.gypi go ahead of it, so we can always hit the
- # upstripped app within the fake dSYM.
- ['1', {
- 'postbuilds': [
- {
- 'postbuild_name': 'Dump Symbols',
- 'action': ['<(DEPTH)/build/mac/dump_app_syms',
- '<(branding)'],
- },
- ],
- }],
+ 'postbuilds': [
+ {
+ 'postbuild_name': 'Dump Symbols',
+ 'action': ['<(DEPTH)/build/mac/dump_app_syms',
+ '<(branding)'],
+ },
],
- }], # mac_breakpad
+ }], # mac_breakpad
['mac_keystone==1', {
'copies': [
{
@@ -2280,7 +2276,7 @@
'files': ['../third_party/googlemac/Releases/Keystone/KeystoneRegistration.framework'],
},
],
- }], # mac_keystone
+ }], # mac_keystone
],
'product_name': '<(mac_product_name)',
'xcode_settings': {