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