scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 1 | # Copyright 2015 Google Inc. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license that can be |
| 4 | # found in the LICENSE file. |
mtklein | dee3df9 | 2015-03-26 05:30:44 -0700 | [diff] [blame] | 5 | |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 6 | # conditions used in both common.gypi and skia.gyp in chromium |
| 7 | # |
| 8 | { |
chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 9 | 'defines': [ |
| 10 | 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', |
mtklein@google.com | dad7070 | 2013-11-20 18:06:10 +0000 | [diff] [blame] | 11 | 'SK_SUPPORT_GPU=<(skia_gpu)', |
| 12 | 'SK_SUPPORT_OPENCL=<(skia_opencl)', |
jvanverth | 4736e14 | 2014-11-07 07:12:46 -0800 | [diff] [blame] | 13 | 'SK_FORCE_DISTANCE_FIELD_TEXT=<(skia_force_distance_field_text)', |
chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 14 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 15 | 'conditions' : [ |
scroggo | c0bc913 | 2014-07-22 12:09:30 -0700 | [diff] [blame] | 16 | ['skia_pic', { |
| 17 | 'cflags': [ |
| 18 | '-fPIC', |
| 19 | ], |
| 20 | 'conditions' : [ |
| 21 | # FIXME: The reason we don't do this on Android is due to the way |
| 22 | # we build the executables/skia_launcher on Android. See |
| 23 | # https://codereview.chromium.org/406613003/diff/1/gyp/common_conditions.gypi#newcode455 |
| 24 | ['skia_os != "android"', { |
| 25 | 'target_conditions': [ |
| 26 | [ '_type == "executable"', { |
| 27 | 'cflags': [ '-fPIE' ], |
| 28 | 'ldflags': [ '-pie' ], |
| 29 | }], |
| 30 | ], |
| 31 | }], |
| 32 | ], |
| 33 | }], |
commit-bot@chromium.org | 6f2d4d4 | 2014-04-02 15:03:56 +0000 | [diff] [blame] | 34 | |
commit-bot@chromium.org | 6a106ce | 2014-05-20 19:02:55 +0000 | [diff] [blame] | 35 | # As of M35, Chrome requires SSE2 on x86 (and SSSE3 on Mac). |
| 36 | [ 'skia_arch_type == "x86"', { |
| 37 | 'cflags': [ |
| 38 | '-msse2', |
| 39 | '-mfpmath=sse', |
| 40 | ], |
| 41 | }], |
| 42 | |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 43 | [ 'skia_os == "win"', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 44 | { |
| 45 | 'defines': [ |
| 46 | 'SK_BUILD_FOR_WIN32', |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 47 | '_CRT_SECURE_NO_WARNINGS', |
senorblanco@chromium.org | 5f47a39 | 2012-07-12 00:34:39 +0000 | [diff] [blame] | 48 | 'GR_GL_FUNCTION_TYPE=__stdcall', |
bungeman | b7069e9 | 2015-07-21 14:14:30 -0700 | [diff] [blame] | 49 | '_HAS_EXCEPTIONS=0', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 50 | ], |
commit-bot@chromium.org | 50ca12b | 2014-05-07 19:56:27 +0000 | [diff] [blame] | 51 | 'msvs_disabled_warnings': [ |
bungeman | f548444 | 2014-09-10 07:49:05 -0700 | [diff] [blame] | 52 | 4275, # An exported class was derived from a class that was not exported |
| 53 | 4345, # This is an FYI about a behavior change from long ago. Chrome stifles it too. |
| 54 | 4355, # 'this' used in base member initializer list. Off by default in newer compilers. |
commit-bot@chromium.org | 50ca12b | 2014-05-07 19:56:27 +0000 | [diff] [blame] | 55 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 56 | 'msvs_cygwin_shell': 0, |
| 57 | 'msvs_settings': { |
| 58 | 'VCCLCompilerTool': { |
bsalomon@google.com | b58a639 | 2013-03-21 20:29:05 +0000 | [diff] [blame] | 59 | 'WarningLevel': '3', |
| 60 | 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 61 | 'DebugInformationFormat': '3', |
bsalomon@google.com | b58a639 | 2013-03-21 20:29:05 +0000 | [diff] [blame] | 62 | 'ExceptionHandling': '0', |
| 63 | 'AdditionalOptions': [ '/MP', ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 64 | }, |
| 65 | 'VCLinkerTool': { |
commit-bot@chromium.org | 4521add | 2014-04-30 20:47:22 +0000 | [diff] [blame] | 66 | 'LargeAddressAware': 2, # 2 means "Yes, please let me use more RAM on 32-bit builds." |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 67 | 'AdditionalDependencies': [ |
| 68 | 'OpenGL32.lib', |
| 69 | 'usp10.lib', |
bungeman@google.com | f51e125 | 2013-06-05 18:35:22 +0000 | [diff] [blame] | 70 | |
| 71 | # Prior to gyp r1584, the following were included automatically. |
| 72 | 'kernel32.lib', |
| 73 | 'gdi32.lib', |
| 74 | 'winspool.lib', |
| 75 | 'comdlg32.lib', |
| 76 | 'advapi32.lib', |
| 77 | 'shell32.lib', |
| 78 | 'ole32.lib', |
| 79 | 'oleaut32.lib', |
| 80 | 'user32.lib', |
| 81 | 'uuid.lib', |
| 82 | 'odbc32.lib', |
| 83 | 'odbccp32.lib', |
bsalomon@google.com | bbba784 | 2013-06-06 18:34:13 +0000 | [diff] [blame] | 84 | 'DelayImp.lib', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 85 | ], |
| 86 | }, |
| 87 | }, |
| 88 | 'configurations': { |
| 89 | 'Debug': { |
| 90 | 'msvs_settings': { |
| 91 | 'VCCLCompilerTool': { |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 92 | 'DebugInformationFormat': '4', # editAndContiue (/ZI) |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 93 | 'Optimization': '0', # optimizeDisabled (/Od) |
| 94 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 95 | 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd) |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 96 | 'RuntimeTypeInfo': 'false', # /GR- |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 97 | }, |
| 98 | 'VCLinkerTool': { |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 99 | 'GenerateDebugInformation': 'true', # /DEBUG |
| 100 | 'LinkIncremental': '2', # /INCREMENTAL |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 101 | }, |
| 102 | }, |
| 103 | }, |
| 104 | 'Release': { |
| 105 | 'msvs_settings': { |
| 106 | 'VCCLCompilerTool': { |
bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 107 | 'DebugInformationFormat': '3', # programDatabase (/Zi) |
commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 108 | 'Optimization': '<(skia_release_optimization_level)', |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 109 | # Changing the floating point model requires rebaseling gm images |
bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 110 | #'FloatingPointModel': '2', # fast (/fp:fast) |
| 111 | 'FavorSizeOrSpeed': '1', # speed (/Ot) |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 112 | 'PreprocessorDefinitions': ['NDEBUG'], |
bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 113 | 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD) |
bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 114 | 'EnableEnhancedInstructionSet': '2',# /arch:SSE2 |
| 115 | 'RuntimeTypeInfo': 'false', # /GR- |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 116 | }, |
| 117 | 'VCLinkerTool': { |
bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 118 | 'GenerateDebugInformation': 'true', # /DEBUG |
bungeman@google.com | 983297e | 2011-10-03 19:36:51 +0000 | [diff] [blame] | 119 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 120 | }, |
| 121 | }, |
commit-bot@chromium.org | d10ec40 | 2014-04-22 20:05:35 +0000 | [diff] [blame] | 122 | }, |
| 123 | 'conditions' : [ |
epoger@google.com | 58d69d8 | 2014-04-01 07:02:41 +0000 | [diff] [blame] | 124 | # Gyp's ninja generator depends on these specially named |
| 125 | # configurations to build 64-bit on Windows. |
| 126 | # See http://skbug.com/2348 |
| 127 | # |
| 128 | # We handle the 64- vs 32-bit variations elsewhere, so I think it's |
| 129 | # OK for us to just make these inherit non-archwidth-specific |
| 130 | # configurations without modification. |
commit-bot@chromium.org | d10ec40 | 2014-04-22 20:05:35 +0000 | [diff] [blame] | 131 | # |
| 132 | # See http://skbug.com/2442 : These targets cause problems in the |
| 133 | # MSVS build, so only include them if gyp is generating a ninja build. |
| 134 | [ '"ninja" in "<!(echo %GYP_GENERATORS%)"', { |
| 135 | 'configurations': { |
| 136 | 'Debug_x64': { |
| 137 | 'inherit_from': ['Debug'], |
bsalomon | 6740feb | 2014-11-13 13:47:06 -0800 | [diff] [blame] | 138 | 'msvs_settings': { |
| 139 | 'VCCLCompilerTool': { |
| 140 | # /ZI is not supported on 64bit |
| 141 | 'DebugInformationFormat': '3', # programDatabase (/Zi) |
| 142 | }, |
| 143 | }, |
commit-bot@chromium.org | d10ec40 | 2014-04-22 20:05:35 +0000 | [diff] [blame] | 144 | }, |
| 145 | 'Release_x64': { |
| 146 | 'inherit_from': ['Release'], |
bsalomon | 26bdfcb | 2014-11-19 08:59:58 -0800 | [diff] [blame] | 147 | 'msvs_settings': { |
| 148 | 'VCCLCompilerTool': { |
| 149 | # Don't specify /arch. SSE2 is implied by 64bit and specifying it warns. |
| 150 | 'EnableEnhancedInstructionSet': '0', # |
| 151 | }, |
| 152 | }, |
commit-bot@chromium.org | d10ec40 | 2014-04-22 20:05:35 +0000 | [diff] [blame] | 153 | }, |
| 154 | 'Release_Developer_x64': { |
| 155 | 'inherit_from': ['Release_Developer'], |
bsalomon | 26bdfcb | 2014-11-19 08:59:58 -0800 | [diff] [blame] | 156 | 'msvs_settings': { |
| 157 | 'VCCLCompilerTool': { |
| 158 | # Don't specify /arch. SSE2 is implied by 64bit and specifying it warns. |
| 159 | 'EnableEnhancedInstructionSet': '0', # |
| 160 | }, |
| 161 | }, |
commit-bot@chromium.org | d10ec40 | 2014-04-22 20:05:35 +0000 | [diff] [blame] | 162 | }, |
| 163 | }, |
| 164 | }], |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 165 | [ 'skia_arch_width == 64', { |
bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 166 | 'msvs_configuration_platform': 'x64', |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 167 | }], |
| 168 | [ 'skia_arch_width == 32', { |
| 169 | 'msvs_configuration_platform': 'Win32', |
| 170 | }], |
| 171 | [ 'skia_warnings_as_errors', { |
bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 172 | 'msvs_settings': { |
| 173 | 'VCCLCompilerTool': { |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 174 | 'WarnAsError': 'true', |
| 175 | 'AdditionalOptions': [ |
| 176 | '/we4189', # initialized but unused var warning |
| 177 | ], |
bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 178 | }, |
| 179 | }, |
borenet@google.com | b796119 | 2012-08-20 18:58:26 +0000 | [diff] [blame] | 180 | }], |
commit-bot@chromium.org | 5a6c2d8 | 2013-06-14 17:10:09 +0000 | [diff] [blame] | 181 | [ 'skia_win_exceptions', { |
| 182 | 'msvs_settings': { |
| 183 | 'VCCLCompilerTool': { |
| 184 | 'AdditionalOptions': [ |
| 185 | '/EHsc', |
| 186 | ], |
| 187 | }, |
| 188 | }, |
| 189 | }], |
bsalomon | da07a08 | 2014-06-26 12:56:28 -0700 | [diff] [blame] | 190 | [ 'skia_win_ltcg', { |
| 191 | 'configurations': { |
| 192 | 'Release': { |
| 193 | 'msvs_settings': { |
| 194 | 'VCCLCompilerTool': { |
| 195 | 'WholeProgramOptimization': 'true', #/GL |
| 196 | }, |
| 197 | 'VCLinkerTool': { |
| 198 | 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG |
| 199 | }, |
| 200 | 'VCLibrarianTool': { |
| 201 | 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG |
| 202 | }, |
| 203 | }, |
| 204 | }, |
| 205 | }, |
| 206 | }], |
borenet@google.com | b796119 | 2012-08-20 18:58:26 +0000 | [diff] [blame] | 207 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 208 | }, |
| 209 | ], |
| 210 | |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 211 | # The following section is common to linux + derivatives and android |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 212 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos", "android"]', |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 213 | { |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 214 | 'cflags': [ |
mtklein@google.com | dad7070 | 2013-11-20 18:06:10 +0000 | [diff] [blame] | 215 | '-g', |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 216 | '-fno-exceptions', |
| 217 | '-fstrict-aliasing', |
mtklein@google.com | dad7070 | 2013-11-20 18:06:10 +0000 | [diff] [blame] | 218 | |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 219 | '-Wall', |
| 220 | '-Wextra', |
| 221 | '-Winit-self', |
| 222 | '-Wpointer-arith', |
mtklein | a07b297 | 2015-01-23 07:01:26 -0800 | [diff] [blame] | 223 | '-Wsign-compare', |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 224 | |
| 225 | '-Wno-unused-parameter', |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 226 | ], |
| 227 | 'cflags_cc': [ |
mtklein | f3cdce7 | 2015-02-05 09:23:56 -0800 | [diff] [blame] | 228 | '-std=c++11', |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 229 | '-fno-rtti', |
| 230 | '-Wnon-virtual-dtor', |
mtklein | 24ad096 | 2014-06-17 11:47:40 -0700 | [diff] [blame] | 231 | '-Wno-invalid-offsetof', # GCC <4.6 is old-school strict about what is POD. |
mtklein@google.com | f1077f9 | 2013-11-20 15:13:49 +0000 | [diff] [blame] | 232 | ], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 233 | 'conditions': [ |
mtklein | dee3df9 | 2015-03-26 05:30:44 -0700 | [diff] [blame] | 234 | [ 'skia_fast', { 'cflags': [ '<@(skia_fast_flags)' ] }], |
qiankun.miao | d312a04 | 2014-07-07 09:47:24 -0700 | [diff] [blame] | 235 | [ 'skia_os != "chromeos"', { |
| 236 | 'conditions': [ |
scroggo | 7cd3f64 | 2015-02-12 13:27:40 -0800 | [diff] [blame] | 237 | [ 'skia_arch_type == "x86_64" and not skia_android_framework', { |
qiankun.miao | d312a04 | 2014-07-07 09:47:24 -0700 | [diff] [blame] | 238 | 'cflags': [ |
| 239 | '-m64', |
| 240 | ], |
| 241 | 'ldflags': [ |
| 242 | '-m64', |
| 243 | ], |
| 244 | }], |
scroggo | 7cd3f64 | 2015-02-12 13:27:40 -0800 | [diff] [blame] | 245 | [ 'skia_arch_type == "x86" and not skia_android_framework', { |
qiankun.miao | d312a04 | 2014-07-07 09:47:24 -0700 | [diff] [blame] | 246 | 'cflags': [ |
| 247 | '-m32', |
| 248 | ], |
| 249 | 'ldflags': [ |
| 250 | '-m32', |
| 251 | ], |
| 252 | }], |
| 253 | ], |
| 254 | }], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 255 | [ 'skia_warnings_as_errors', { |
| 256 | 'cflags': [ |
| 257 | '-Werror', |
| 258 | ], |
| 259 | }], |
commit-bot@chromium.org | 35d4872 | 2014-02-13 18:36:36 +0000 | [diff] [blame] | 260 | # For profiling; reveals some costs, exaggerates others (e.g. trivial setters & getters). |
| 261 | [ 'skia_disable_inlining', { |
| 262 | 'cflags': [ |
| 263 | '-fno-inline', |
| 264 | '-fno-default-inline', |
| 265 | '-finline-limit=0', |
| 266 | '-fno-omit-frame-pointer', |
| 267 | ], |
| 268 | }], |
djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 269 | [ 'skia_arch_type == "arm" and arm_version >= 7', { |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 270 | 'cflags': [ |
| 271 | '-march=armv7-a', |
mtklein | 2d33a1d | 2015-04-02 10:47:57 -0700 | [diff] [blame] | 272 | '-mthumb', |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 273 | ], |
djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 274 | 'ldflags': [ |
| 275 | '-march=armv7-a', |
| 276 | ], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 277 | 'conditions': [ |
| 278 | [ 'arm_neon == 1', { |
| 279 | 'defines': [ |
djsollen | 21769c5 | 2014-08-01 05:32:32 -0700 | [diff] [blame] | 280 | 'SK_ARM_HAS_NEON', |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 281 | ], |
| 282 | 'cflags': [ |
| 283 | '-mfpu=neon', |
| 284 | ], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 285 | }], |
| 286 | [ 'arm_neon_optional == 1', { |
| 287 | 'defines': [ |
djsollen | 21769c5 | 2014-08-01 05:32:32 -0700 | [diff] [blame] | 288 | 'SK_ARM_HAS_OPTIONAL_NEON', |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 289 | ], |
| 290 | }], |
mtklein | 19996ed | 2014-11-21 06:48:43 -0800 | [diff] [blame] | 291 | [ 'skia_os != "chromeos" and skia_os != "linux"', { |
borenet@google.com | e2b9037 | 2013-07-11 18:46:30 +0000 | [diff] [blame] | 292 | 'cflags': [ |
| 293 | '-mfloat-abi=softfp', |
| 294 | ], |
| 295 | }], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 296 | ], |
| 297 | }], |
djordje.pesut | aaf1df6 | 2014-06-06 14:09:12 -0700 | [diff] [blame] | 298 | [ 'skia_arch_type == "mips"', { |
| 299 | 'cflags': [ |
| 300 | '-EL', |
| 301 | ], |
| 302 | 'conditions': [ |
| 303 | [ 'mips_arch_variant == "mips32r2"', { |
| 304 | 'cflags': [ |
| 305 | '-march=mips32r2', |
| 306 | ], |
| 307 | 'conditions': [ |
| 308 | [ 'mips_dsp == 1', { |
| 309 | 'cflags': [ |
| 310 | '-mdsp', |
| 311 | ], |
djordje.pesut | 6336f7c | 2014-07-14 07:48:11 -0700 | [diff] [blame] | 312 | 'defines': [ |
| 313 | 'SK_MIPS_HAS_DSP', |
| 314 | ], |
djordje.pesut | aaf1df6 | 2014-06-06 14:09:12 -0700 | [diff] [blame] | 315 | }], |
| 316 | [ 'mips_dsp == 2', { |
| 317 | 'cflags': [ |
| 318 | '-mdspr2', |
| 319 | ], |
djordje.pesut | 632a454 | 2014-06-11 06:56:10 -0700 | [diff] [blame] | 320 | 'defines': [ |
djordje.pesut | 6336f7c | 2014-07-14 07:48:11 -0700 | [diff] [blame] | 321 | 'SK_MIPS_HAS_DSP', |
| 322 | 'SK_MIPS_HAS_DSPR2', |
djordje.pesut | 632a454 | 2014-06-11 06:56:10 -0700 | [diff] [blame] | 323 | ], |
djordje.pesut | aaf1df6 | 2014-06-06 14:09:12 -0700 | [diff] [blame] | 324 | }], |
| 325 | ], |
| 326 | }], |
| 327 | ], |
| 328 | }], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 329 | ], |
| 330 | }, |
| 331 | ], |
| 332 | |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 333 | ['skia_android_framework', { |
| 334 | 'cflags': [ |
| 335 | # Skia does not enforce this usage pattern so we disable it here to avoid |
| 336 | # unecessary log spew when building |
| 337 | '-Wno-unused-parameter', |
| 338 | |
| 339 | # Android's -D_FORTIFY_SOURCE=2 extensions are incompatibile with SkString. |
| 340 | # Revert to -D_FORTIFY_SOURCE=1 |
| 341 | '-U_FORTIFY_SOURCE', |
| 342 | '-D_FORTIFY_SOURCE=1', |
djsollen | f379ad3 | 2015-01-27 09:01:01 -0800 | [diff] [blame] | 343 | |
| 344 | # We can't use the skia_shared_library gyp setting because we need to |
| 345 | # isolate this define to Skia sources. CFLAGS are local to Android.mk |
| 346 | # and ensures that this define is not exported to clients of the library |
| 347 | '-DSKIA_IMPLEMENTATION=1', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 348 | ], |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 349 | # Remove flags which are either unnecessary or problematic for the |
| 350 | # Android framework build. Many of these flags are removed simply because |
| 351 | # they were not previously in the Android framework makefile, and we did |
| 352 | # did not intend to add them when generating the makefile. |
| 353 | # TODO (scroggo): Investigate whether any of these flags are actually |
| 354 | # needed/would be beneficial. |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 355 | 'cflags!': [ |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 356 | # Android has one makefile, used for both debugging (after manual |
| 357 | # modification) and release. Turn off debug info by default. |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 358 | '-g', |
| 359 | '-march=armv7-a', |
| 360 | '-mthumb', |
| 361 | '-mfpu=neon', |
| 362 | '-mfloat-abi=softfp', |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 363 | '-fno-exceptions', |
| 364 | '-fstrict-aliasing', |
| 365 | # Remove flags to turn on warnings, since most people building Android |
| 366 | # are not focused on Skia and do not need the extra warning info. |
| 367 | '-Wall', |
| 368 | '-Wextra', |
| 369 | '-Winit-self', |
| 370 | '-Wpointer-arith', |
mtklein | a07b297 | 2015-01-23 07:01:26 -0800 | [diff] [blame] | 371 | '-Wsign-compare', |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 372 | ], |
| 373 | 'cflags_cc!': [ |
| 374 | '-fno-rtti', |
| 375 | '-Wnon-virtual-dtor', |
commit-bot@chromium.org | e72a408 | 2014-02-28 16:07:39 +0000 | [diff] [blame] | 376 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 377 | 'defines': [ |
| 378 | 'DCT_IFAST_SUPPORTED', |
| 379 | # using freetype's embolden allows us to adjust fake bold settings at |
| 380 | # draw-time, at which point we know which SkTypeface is being drawn |
| 381 | 'SK_USE_FREETYPE_EMBOLDEN', |
commit-bot@chromium.org | ba0c5ea | 2014-03-28 15:59:04 +0000 | [diff] [blame] | 382 | 'SK_SFNTLY_SUBSETTER "sample/chromium/font_subsetter.h"', |
| 383 | # When built as part of the system image we can enable certian non-NDK |
| 384 | # compliant optimizations. |
| 385 | 'SK_BUILD_FOR_ANDROID_FRAMEWORK', |
commit-bot@chromium.org | ba0c5ea | 2014-03-28 15:59:04 +0000 | [diff] [blame] | 386 | # Optimizations for chromium (m30) |
| 387 | 'GR_GL_CUSTOM_SETUP_HEADER "gl/GrGLConfig_chrome.h"', |
| 388 | 'IGNORE_ROT_AA_RECT_OPT', |
commit-bot@chromium.org | ba0c5ea | 2014-03-28 15:59:04 +0000 | [diff] [blame] | 389 | 'SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)', |
commit-bot@chromium.org | e3c400f | 2014-05-28 21:44:05 +0000 | [diff] [blame] | 390 | 'SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)', |
krajcevski | 8c111f7 | 2014-06-02 13:51:34 -0700 | [diff] [blame] | 391 | 'SK_IGNORE_ETC1_SUPPORT', |
djsollen | f379ad3 | 2015-01-27 09:01:01 -0800 | [diff] [blame] | 392 | # We can't use the skia_shared_library gyp setting because we need expose |
| 393 | # this define globally and the the implemention define as a cflag. |
| 394 | 'SKIA_DLL', |
scroggo | 230d4ac | 2015-03-26 07:15:55 -0700 | [diff] [blame] | 395 | 'SK_PRINT_CODEC_MESSAGES', |
borenet | 243406e | 2015-07-22 13:29:25 -0700 | [diff] [blame^] | 396 | ], |
| 397 | }], |
| 398 | |
| 399 | ['skia_use_android_framework_defines', { |
| 400 | # Add these defines when building for the Android framework, or when |
| 401 | # specifically requested. These should be temporary staging defines. Any |
| 402 | # permanent defines should be moved into the skia_android_framework block |
| 403 | # above. |
| 404 | 'includes' : [ |
| 405 | 'skia_for_android_framework_defines.gypi', |
| 406 | ], |
| 407 | 'defines': [ |
commit-bot@chromium.org | 22a1d96 | 2014-05-30 21:53:01 +0000 | [diff] [blame] | 408 | '<@(skia_for_android_framework_defines)', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 409 | ], |
| 410 | }], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 411 | |
borenet | 4808757 | 2015-04-02 12:16:36 -0700 | [diff] [blame] | 412 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 413 | { |
| 414 | 'defines': [ |
| 415 | 'SK_SAMPLES_FOR_X', |
| 416 | 'SK_BUILD_FOR_UNIX', |
| 417 | ], |
| 418 | 'configurations': { |
mtklein@google.com | 1fb04e2 | 2013-09-13 19:32:43 +0000 | [diff] [blame] | 419 | 'Coverage': { |
borenet | 11271fe | 2015-07-06 07:43:58 -0700 | [diff] [blame] | 420 | 'conditions': [ |
| 421 | [ 'skia_clang_build', { |
| 422 | 'cflags': ['-fprofile-instr-generate', '-fcoverage-mapping'], |
| 423 | 'ldflags': ['-fprofile-instr-generate', '-fcoverage-mapping'], |
| 424 | }, { |
| 425 | 'cflags': ['--coverage'], |
| 426 | 'ldflags': ['--coverage'], |
| 427 | }], |
| 428 | ], |
mtklein@google.com | 1fb04e2 | 2013-09-13 19:32:43 +0000 | [diff] [blame] | 429 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 430 | 'Debug': { |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 431 | }, |
| 432 | 'Release': { |
commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 433 | 'cflags': [ |
| 434 | '-O<(skia_release_optimization_level)', |
commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 435 | ], |
senorblanco@chromium.org | 7288c49 | 2012-01-19 19:59:22 +0000 | [diff] [blame] | 436 | 'defines': [ 'NDEBUG' ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 437 | }, |
| 438 | }, |
borenet@google.com | a37a517 | 2012-08-09 20:44:32 +0000 | [diff] [blame] | 439 | 'conditions' : [ |
zachr@google.com | 28c27c8 | 2013-06-20 17:15:05 +0000 | [diff] [blame] | 440 | [ 'skia_shared_lib', { |
zachr@google.com | 28c27c8 | 2013-06-20 17:15:05 +0000 | [diff] [blame] | 441 | 'defines': [ |
zachr@google.com | 28c27c8 | 2013-06-20 17:15:05 +0000 | [diff] [blame] | 442 | 'SKIA_DLL', |
| 443 | 'SKIA_IMPLEMENTATION=1', |
| 444 | ], |
| 445 | }], |
mtklein@google.com | 9f3b0e4 | 2013-10-08 15:16:36 +0000 | [diff] [blame] | 446 | # Enable asan, tsan, etc. |
| 447 | [ 'skia_sanitizer', { |
borenet@google.com | 0d19309 | 2013-07-03 15:55:05 +0000 | [diff] [blame] | 448 | 'cflags': [ |
mtklein@google.com | 9f3b0e4 | 2013-10-08 15:16:36 +0000 | [diff] [blame] | 449 | '-fsanitize=<(skia_sanitizer)', |
borenet@google.com | 0d19309 | 2013-07-03 15:55:05 +0000 | [diff] [blame] | 450 | ], |
| 451 | 'ldflags': [ |
mtklein@google.com | 9f3b0e4 | 2013-10-08 15:16:36 +0000 | [diff] [blame] | 452 | '-fsanitize=<(skia_sanitizer)', |
bungeman@google.com | 1435f9f | 2013-09-25 22:39:22 +0000 | [diff] [blame] | 453 | ], |
mtklein@google.com | 3a19fb5 | 2013-10-09 16:12:23 +0000 | [diff] [blame] | 454 | 'conditions' : [ |
| 455 | [ 'skia_sanitizer == "thread"', { |
mtklein | 172b455 | 2015-03-12 05:27:46 -0700 | [diff] [blame] | 456 | 'defines': [ 'THREAD_SANITIZER' ], |
mtklein@google.com | 3a19fb5 | 2013-10-09 16:12:23 +0000 | [diff] [blame] | 457 | }], |
commit-bot@chromium.org | 05b1b53 | 2014-05-01 19:29:46 +0000 | [diff] [blame] | 458 | [ 'skia_sanitizer == "undefined"', { |
commit-bot@chromium.org | 05b1b53 | 2014-05-01 19:29:46 +0000 | [diff] [blame] | 459 | 'cflags_cc!': ['-fno-rtti'], |
commit-bot@chromium.org | 05b1b53 | 2014-05-01 19:29:46 +0000 | [diff] [blame] | 460 | }], |
mtklein@google.com | 3a19fb5 | 2013-10-09 16:12:23 +0000 | [diff] [blame] | 461 | ], |
bungeman@google.com | 1435f9f | 2013-09-25 22:39:22 +0000 | [diff] [blame] | 462 | }], |
borenet@google.com | 47ae4b0 | 2013-08-21 18:02:50 +0000 | [diff] [blame] | 463 | [ 'skia_clang_build', { |
mtklein | 170e00d | 2014-06-30 12:33:11 -0700 | [diff] [blame] | 464 | 'cflags_cc': [ |
mtklein | 170e00d | 2014-06-30 12:33:11 -0700 | [diff] [blame] | 465 | '-Wno-unknown-warning-option', # Allows unknown warnings. |
| 466 | '-Wno-deprecated', # From Qt, via debugger (older Clang). |
| 467 | '-Wno-deprecated-register', # From Qt, via debugger (newer Clang). |
| 468 | ], |
borenet@google.com | 47ae4b0 | 2013-08-21 18:02:50 +0000 | [diff] [blame] | 469 | 'cflags': [ |
mtklein | 170e00d | 2014-06-30 12:33:11 -0700 | [diff] [blame] | 470 | # Extra warnings we like but that only Clang knows about. |
| 471 | '-Wstring-conversion', |
borenet@google.com | 47ae4b0 | 2013-08-21 18:02:50 +0000 | [diff] [blame] | 472 | ], |
commit-bot@chromium.org | 815d360 | 2014-05-20 19:42:03 +0000 | [diff] [blame] | 473 | 'cflags!': [ |
| 474 | '-mfpmath=sse', # Clang doesn't need to be told this, and sometimes gets confused. |
| 475 | ], |
borenet@google.com | 47ae4b0 | 2013-08-21 18:02:50 +0000 | [diff] [blame] | 476 | }], |
commit-bot@chromium.org | 5003bde | 2013-10-25 18:14:54 +0000 | [diff] [blame] | 477 | [ 'skia_keep_frame_pointer', { |
| 478 | 'cflags': [ '-fno-omit-frame-pointer' ], |
| 479 | }], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 480 | ], |
| 481 | }, |
| 482 | ], |
| 483 | |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 484 | [ 'skia_os == "mac"', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 485 | { |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 486 | 'defines': [ 'SK_BUILD_FOR_MAC' ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 487 | 'configurations': { |
commit-bot@chromium.org | 866f4e3 | 2013-11-21 17:04:29 +0000 | [diff] [blame] | 488 | 'Coverage': { |
| 489 | 'xcode_settings': { |
| 490 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 491 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', |
| 492 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS' : 'YES', |
| 493 | }, |
| 494 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 495 | 'Debug': { |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 496 | 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '0' }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 497 | }, |
reed@google.com | e05cc8e | 2011-10-10 14:19:40 +0000 | [diff] [blame] | 498 | 'Release': { |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 499 | 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)', }, |
senorblanco@chromium.org | 7288c49 | 2012-01-19 19:59:22 +0000 | [diff] [blame] | 500 | 'defines': [ 'NDEBUG' ], |
reed@google.com | e05cc8e | 2011-10-10 14:19:40 +0000 | [diff] [blame] | 501 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 502 | }, |
| 503 | 'xcode_settings': { |
senorblanco@chromium.org | 29f351a | 2014-01-20 16:14:02 +0000 | [diff] [blame] | 504 | 'conditions': [ |
mtklein | dee3df9 | 2015-03-26 05:30:44 -0700 | [diff] [blame] | 505 | [ 'skia_fast', { 'WARNING_CFLAGS': [ '<@(skia_fast_flags)' ] } ], |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 506 | [ 'skia_warnings_as_errors', { 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES' }], |
| 507 | [ 'skia_arch_width == 32', { 'ARCHS': ['i386'] }], |
| 508 | [ 'skia_arch_width == 64', { 'ARCHS': ['x86_64'] }], |
senorblanco@chromium.org | 29f351a | 2014-01-20 16:14:02 +0000 | [diff] [blame] | 509 | [ 'skia_osx_deployment_target==""', { |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 510 | 'MACOSX_DEPLOYMENT_TARGET': '10.6', # -mmacos-version-min, passed in env to ld. |
senorblanco@chromium.org | 29f351a | 2014-01-20 16:14:02 +0000 | [diff] [blame] | 511 | }, { |
| 512 | 'MACOSX_DEPLOYMENT_TARGET': '<(skia_osx_deployment_target)', |
| 513 | }], |
| 514 | ], |
mtklein | 65fd599 | 2015-02-03 13:24:36 -0800 | [diff] [blame] | 515 | 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', |
mtklein | 94c4151 | 2014-09-12 17:07:34 -0700 | [diff] [blame] | 516 | 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', # -mssse3 |
| 517 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', # -fvisibility=hidden |
| 518 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO', # -fvisibility-inlines-hidden |
mtklein | 335a0ae | 2014-10-13 12:32:34 -0700 | [diff] [blame] | 519 | 'GCC_CW_ASM_SYNTAX': 'NO', # remove -fasm-blocks |
| 520 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # remove -mpascal-strings |
| 521 | 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO', # -Wno-invalid-offsetof |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 522 | 'WARNING_CFLAGS': [ |
| 523 | '-Wall', |
| 524 | '-Wextra', |
mtklein | a07b297 | 2015-01-23 07:01:26 -0800 | [diff] [blame] | 525 | '-Winit-self', |
| 526 | '-Wpointer-arith', |
| 527 | '-Wsign-compare', |
| 528 | |
mtklein | a34633f | 2014-08-19 13:32:59 -0700 | [diff] [blame] | 529 | '-Wno-unused-parameter', |
bungeman@google.com | 43b4ed5 | 2012-10-02 15:42:21 +0000 | [diff] [blame] | 530 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 531 | }, |
| 532 | }, |
| 533 | ], |
| 534 | |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 535 | [ 'skia_os == "ios"', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 536 | { |
| 537 | 'defines': [ |
| 538 | 'SK_BUILD_FOR_IOS', |
| 539 | ], |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 540 | 'conditions' : [ |
| 541 | [ 'skia_warnings_as_errors', { |
| 542 | 'xcode_settings': { |
| 543 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 544 | '-Werror', |
| 545 | ], |
| 546 | }, |
| 547 | }], |
| 548 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 549 | 'configurations': { |
| 550 | 'Debug': { |
| 551 | 'xcode_settings': { |
| 552 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 553 | }, |
| 554 | }, |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 555 | 'Release': { |
| 556 | 'xcode_settings': { |
commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 557 | 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)', |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 558 | }, |
| 559 | 'defines': [ 'NDEBUG' ], |
| 560 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 561 | }, |
| 562 | 'xcode_settings': { |
commit-bot@chromium.org | ae0054e | 2014-04-05 01:13:43 +0000 | [diff] [blame] | 563 | 'ARCHS': ['armv7'], |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 564 | 'CODE_SIGNING_REQUIRED': 'NO', |
mtklein | ea6075e | 2015-04-16 13:29:58 -0700 | [diff] [blame] | 565 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer: Google Development (3F4Y5873JF)', |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 566 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', |
caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 567 | 'SDKROOT': 'iphoneos', |
caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 568 | 'TARGETED_DEVICE_FAMILY': '1,2', |
mtklein | 335a0ae | 2014-10-13 12:32:34 -0700 | [diff] [blame] | 569 | 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO', # -Wno-invalid-offsetof |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 570 | 'OTHER_CPLUSPLUSFLAGS': [ |
mtklein | f3cdce7 | 2015-02-05 09:23:56 -0800 | [diff] [blame] | 571 | '-std=c++0x', |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 572 | '-fvisibility=hidden', |
| 573 | '-fvisibility-inlines-hidden', |
| 574 | ], |
bsalomon@google.com | 89dec58 | 2012-09-28 18:33:11 +0000 | [diff] [blame] | 575 | 'GCC_THUMB_SUPPORT': 'NO', |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 576 | }, |
| 577 | }, |
| 578 | ], |
chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 579 | |
borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 580 | [ 'skia_os == "android"', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 581 | { |
| 582 | 'defines': [ |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 583 | 'SK_BUILD_FOR_ANDROID', |
djsollen@google.com | 968757e | 2014-04-11 13:09:21 +0000 | [diff] [blame] | 584 | |
| 585 | # Android Text Tuning |
| 586 | 'SK_GAMMA_EXPONENT=1.4', |
| 587 | 'SK_GAMMA_CONTRAST=0.0', |
| 588 | ], |
| 589 | # Android defines a fixed gamma exponent instead of using SRGB |
| 590 | 'defines!': [ |
| 591 | 'SK_GAMMA_SRGB', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 592 | ], |
scroggo@google.com | eb62950 | 2014-02-04 16:08:48 +0000 | [diff] [blame] | 593 | 'configurations': { |
| 594 | 'Debug': { |
mtklein | c0591ca | 2014-11-21 14:42:35 -0800 | [diff] [blame] | 595 | 'cflags': ['-g'] |
scroggo@google.com | eb62950 | 2014-02-04 16:08:48 +0000 | [diff] [blame] | 596 | }, |
| 597 | 'Release': { |
| 598 | 'cflags': ['-O2'], |
scroggo@google.com | eb62950 | 2014-02-04 16:08:48 +0000 | [diff] [blame] | 599 | }, |
| 600 | }, |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 601 | 'libraries': [ |
djsollen@google.com | 318cf92 | 2011-11-08 19:03:43 +0000 | [diff] [blame] | 602 | '-llog', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 603 | ], |
djsollen@google.com | 44360bc | 2011-12-05 13:55:55 +0000 | [diff] [blame] | 604 | 'cflags': [ |
borenet@google.com | de9ac14 | 2012-07-25 15:17:03 +0000 | [diff] [blame] | 605 | '-fuse-ld=gold', |
djsollen@google.com | 44360bc | 2011-12-05 13:55:55 +0000 | [diff] [blame] | 606 | ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 607 | 'conditions': [ |
scroggo | df1c337 | 2015-02-12 10:48:25 -0800 | [diff] [blame] | 608 | [ '"x86" in skia_arch_type', { |
djsollen | bc89329 | 2014-07-24 13:53:56 -0700 | [diff] [blame] | 609 | 'cflags': [ |
| 610 | '-mssse3', |
| 611 | ], |
| 612 | }], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 613 | [ 'skia_android_framework', { |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 614 | 'cflags!': [ |
| 615 | '-fuse-ld=gold', |
scroggo | 7cd3f64 | 2015-02-12 13:27:40 -0800 | [diff] [blame] | 616 | '-mssse3', |
commit-bot@chromium.org | 2fe641b | 2014-03-25 15:14:18 +0000 | [diff] [blame] | 617 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 618 | }], |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 619 | [ 'skia_shared_lib', { |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 620 | 'defines': [ |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 621 | 'SKIA_DLL', |
| 622 | 'SKIA_IMPLEMENTATION=1', |
scroggo | ecce60b | 2014-07-09 07:26:40 -0700 | [diff] [blame] | 623 | # Needed until we fix skbug.com/2440. |
| 624 | 'SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG', |
djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 625 | ], |
| 626 | }], |
commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 627 | [ 'skia_profile_enabled == 1', { |
| 628 | 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], |
djsollen@google.com | 3839ca1 | 2011-11-03 17:31:41 +0000 | [diff] [blame] | 629 | }], |
chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 630 | ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 631 | }, |
| 632 | ], |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 633 | |
commit-bot@chromium.org | 199cf69 | 2014-05-08 15:29:57 +0000 | [diff] [blame] | 634 | [ 'skia_moz2d', { |
| 635 | 'defines': [ |
reed | 6518eaa | 2014-06-18 14:05:22 -0700 | [diff] [blame] | 636 | # add flags here (e.g. SK_SUPPORT_LEGACY_...) needed by moz2d |
commit-bot@chromium.org | 199cf69 | 2014-05-08 15:29:57 +0000 | [diff] [blame] | 637 | ], |
| 638 | }], |
| 639 | |
mtklein | 4abc186 | 2015-07-14 05:52:52 -0700 | [diff] [blame] | 640 | [ 'sknx_no_simd', { |
| 641 | 'defines': [ 'SKNX_NO_SIMD' ], |
| 642 | }], |
| 643 | |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 644 | ], # end 'conditions' |
caryclark@google.com | 4588ce8 | 2012-09-26 15:48:43 +0000 | [diff] [blame] | 645 | # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details |
| 646 | 'xcode_settings': { |
| 647 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 648 | }, |
seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 649 | } |