From 5afbbc47df9ede9031348857ab512836ba580f31 Mon Sep 17 00:00:00 2001 From: "djsollen@google.com" Date: Thu, 29 Nov 2012 15:09:58 +0000 Subject: Enable profiling options to be selectively enabled for a given build Review URL: https://codereview.appspot.com/6858089 git-svn-id: http://skia.googlecode.com/svn/trunk@6598 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gyp/common_conditions.gypi | 3 +++ gyp/common_variables.gypi | 2 ++ gyp/opts.gyp | 3 +++ 3 files changed, 8 insertions(+) (limited to 'gyp') diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index 0bbd660e11..6d1a4f84a9 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -290,6 +290,9 @@ '<(android_base)/toolchains/<(android_toolchain)/sysroot/usr/include', ], 'conditions': [ + [ 'skia_profile_enabled == 1', { + 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], + }], [ 'skia_arch_type == "arm"', { 'ldflags': [ '-Wl', diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index 974e93bdd2..1c900c52bb 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -86,6 +86,7 @@ 'skia_directwrite%': 0, 'skia_gpu%': 1, 'skia_osx_sdkroot%': 'macosx', + 'skia_profile_enabled%': 0, }, # Re-define all variables defined within the level-2 'variables' dict, @@ -104,6 +105,7 @@ 'skia_directwrite%': '<(skia_directwrite)', 'skia_gpu%': '<(skia_gpu)', 'skia_osx_sdkroot%': '<(skia_osx_sdkroot)', + 'skia_profile_enabled%': '<(skia_profile_enabled)', 'skia_static_initializers%': '<(skia_static_initializers)', 'ios_sdk_version%': '6.0', diff --git a/gyp/opts.gyp b/gyp/opts.gyp index cd892e8f59..de27b42588 100644 --- a/gyp/opts.gyp +++ b/gyp/opts.gyp @@ -54,9 +54,12 @@ # ARM), the compiler doesn't like that. 'cflags!': [ '-fno-omit-frame-pointer', + '-mapcs-frame', + '-mapcs', ], 'cflags': [ '-fomit-frame-pointer', + '-mno-apcs-frame', ], 'variables': { 'arm_neon_optional%': '<(arm_neon_optional>', -- cgit v1.2.3