summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 23:27:33 +0000
committertschmelcher@google.com <tschmelcher@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-11 23:27:33 +0000
commit9f177a193ab0a674eea1c42238e1de75e50472a6 (patch)
tree80ac564ce0c9570a72178448ca2baf929258fec1
parent50285fffa5e44c61cbf6141908c6297fbd0b20d4 (diff)
downloadchromium_src-9f177a193ab0a674eea1c42238e1de75e50472a6.zip
chromium_src-9f177a193ab0a674eea1c42238e1de75e50472a6.tar.gz
chromium_src-9f177a193ab0a674eea1c42238e1de75e50472a6.tar.bz2
O2D Mac: Include pixman+cairo debugging symbols in O3D debug builds.
TEST=built on Mac in Release and Debug modes, verified proper flag was used for each; verified debugging information seen in gdb when using Debug build BUG=none Review URL: http://codereview.chromium.org/6684014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77890 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--o3d/build/cairo.gyp5
-rw-r--r--o3d/build/common.gypi14
-rw-r--r--o3d/build/pixman.gyp5
3 files changed, 20 insertions, 4 deletions
diff --git a/o3d/build/cairo.gyp b/o3d/build/cairo.gyp
index 2bcdf53..92d6ad8 100644
--- a/o3d/build/cairo.gyp
+++ b/o3d/build/cairo.gyp
@@ -59,8 +59,9 @@
# find it.
'PATH=<(pkgconfigroot)/usr/bin:$PATH && '
# Configure it.
- 'CFLAGS="-arch <(mac_gcc_arch)" ./configure '
- '--prefix=<(pkgconfigroot)/usr --disable-shared '
+ 'CFLAGS="-arch <(mac_gcc_arch) <(mac_gcc_debug_flag)" '
+ './configure --prefix=<(pkgconfigroot)/usr '
+ '--disable-shared '
# Disable things we don't need that have additional
# external dependencies.
'--disable-png --disable-svg --disable-ft && '
diff --git a/o3d/build/common.gypi b/o3d/build/common.gypi
index d324dcc..77f4a87 100644
--- a/o3d/build/common.gypi
+++ b/o3d/build/common.gypi
@@ -178,6 +178,20 @@
],
['OS == "mac"',
{
+ 'variables': {
+ # Ridiculously, it is impossible to define a GYP variable whose value
+ # depends on the choice of build configuration, so to get this to be
+ # -g only when building Debug we define it as a shell fragment that
+ # uses command substitution to evaluate to different things based on
+ # the Xcode "CONFIGURATION" environment variable. We further have to
+ # use `` instead of $() because GYP/Xcode mangles $().
+ 'mac_gcc_debug_flag':
+ '`if [ "$CONFIGURATION" = Debug ]; then '
+ 'echo -g; '
+ 'else '
+ 'echo -g0; '
+ 'fi`'
+ },
'conditions': [
['target_arch == "ia32"',
{
diff --git a/o3d/build/pixman.gyp b/o3d/build/pixman.gyp
index a6e9457..7c1aee7 100644
--- a/o3d/build/pixman.gyp
+++ b/o3d/build/pixman.gyp
@@ -38,8 +38,9 @@
# Go there!
'cd <(pixmanbuilddir) && '
# Configure it.
- 'CFLAGS="-arch <(mac_gcc_arch)" ./configure '
- '--prefix=<(pkgconfigroot)/usr --disable-shared && '
+ 'CFLAGS="-arch <(mac_gcc_arch) <(mac_gcc_debug_flag)" '
+ './configure --prefix=<(pkgconfigroot)/usr '
+ '--disable-shared && '
# Build.
'make && '
# "Install" to pkgconfigroot.