Add gyp define for optimization level
R=tomhudson@google.com, djsollen@google.com, epoger@google.com, bungeman@google.com
Author: borenet@google.com
Review URL: https://chromiumcodereview.appspot.com/17370005
git-svn-id: http://skia.googlecode.com/svn/trunk@9710 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 3a49f14..4aa503d 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -76,7 +76,7 @@
'msvs_settings': {
'VCCLCompilerTool': {
'DebugInformationFormat': '3', # programDatabase (/Zi)
- 'Optimization': '3', # full (/Ox)
+ 'Optimization': '<(skia_release_optimization_level)',
'WholeProgramOptimization': 'true', #/GL
# Changing the floating point model requires rebaseling gm images
#'FloatingPointModel': '2', # fast (/fp:fast)
@@ -137,7 +137,10 @@
'cflags': ['-g']
},
'Release': {
- 'cflags': ['-O3 -g'],
+ 'cflags': [
+ '-O<(skia_release_optimization_level)',
+ '-g',
+ ],
'defines': [ 'NDEBUG' ],
},
},
@@ -246,7 +249,7 @@
},
'Release': {
'xcode_settings': {
- 'GCC_OPTIMIZATION_LEVEL': '3',
+ 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
},
'defines': [ 'NDEBUG' ],
},
@@ -312,7 +315,7 @@
},
'Release': {
'xcode_settings': {
- 'GCC_OPTIMIZATION_LEVEL': '3',
+ 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
},
'defines': [ 'NDEBUG' ],
},