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