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