#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
# conditions used in both common.gypi and skia.gyp in chromium
#
{
'-Wno-invalid-offsetof', # GCC <4.6 is old-school strict about what is POD.
],
'conditions': [
+ [ 'skia_fast', { 'cflags': [ '<@(skia_fast_flags)' ] }],
[ 'skia_os != "chromeos"', {
'conditions': [
[ 'skia_arch_type == "x86_64" and not skia_android_framework', {
},
'xcode_settings': {
'conditions': [
+ [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ],
[ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES' }],
[ 'skia_arch_width == 32', { 'ARCHS': ['i386'] }],
[ 'skia_arch_width == 64', { 'ARCHS': ['x86_64'] }],
'skia_moz2d%': 0,
'skia_is_bot%': '<!(python -c "import os; print os.environ.get(\'CHROME_HEADLESS\', 0)")',
'skia_egl%': '<(skia_egl)',
+ 'skia_fast%': 0,
+ 'skia_fast_flags': [
+ '-O3', # Even for Debug builds.
+ '-march=native', # Use all features of and optimize for THIS machine.
+ '-fomit-frame-pointer', # Sometimes an extra register is nice, and cuts a push/pop.
+ '-ffast-math', # Optimize float math even when it breaks IEEE compliance.
+ #'-flto' # Enable link-time optimization.
+ ],
# These are referenced by our .gypi files that list files (e.g. core.gypi)
#