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