| 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)', |
| reed@google.com | 1f1543f | 2012-09-12 21:08:33 +0000 | [diff] [blame] | 6 | # 'SK_SUPPORT_HINTING_SCALE_FACTOR', |
| chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 7 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 8 | 'conditions' : [ |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 9 | [ 'skia_gpu == 1', |
| bsalomon@google.com | cf8fb1f | 2012-08-02 14:03:32 +0000 | [diff] [blame] | 10 | { |
| 11 | 'defines': [ |
| 12 | 'SK_SUPPORT_GPU=1', |
| 13 | ], |
| 14 | }, { |
| 15 | 'defines': [ |
| 16 | 'SK_SUPPORT_GPU=0', |
| 17 | ], |
| 18 | }, |
| 19 | ], |
| zachr@google.com | d658568 | 2013-07-17 19:29:19 +0000 | [diff] [blame] | 20 | [ 'skia_opencl == 1', |
| 21 | { |
| 22 | 'defines': [ |
| 23 | 'SK_SUPPORT_OPENCL=1', |
| 24 | ], |
| 25 | }, { |
| 26 | 'defines': [ |
| 27 | 'SK_SUPPORT_OPENCL=0', |
| 28 | ], |
| 29 | }, |
| 30 | ], |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 31 | [ 'skia_os == "win"', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 32 | { |
| 33 | 'defines': [ |
| 34 | 'SK_BUILD_FOR_WIN32', |
| reed@google.com | ebbda76 | 2013-08-07 15:30:09 +0000 | [diff] [blame^] | 35 | 'SK_FONTHOST_USES_FONTMGR', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 36 | 'SK_IGNORE_STDINT_DOT_H', |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 37 | '_CRT_SECURE_NO_WARNINGS', |
| senorblanco@chromium.org | 5f47a39 | 2012-07-12 00:34:39 +0000 | [diff] [blame] | 38 | 'GR_GL_FUNCTION_TYPE=__stdcall', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 39 | ], |
| 40 | 'msvs_cygwin_shell': 0, |
| 41 | 'msvs_settings': { |
| 42 | 'VCCLCompilerTool': { |
| bsalomon@google.com | b58a639 | 2013-03-21 20:29:05 +0000 | [diff] [blame] | 43 | 'WarningLevel': '3', |
| 44 | 'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 45 | 'DebugInformationFormat': '3', |
| bsalomon@google.com | b58a639 | 2013-03-21 20:29:05 +0000 | [diff] [blame] | 46 | 'ExceptionHandling': '0', |
| 47 | 'AdditionalOptions': [ '/MP', ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 48 | }, |
| 49 | 'VCLinkerTool': { |
| 50 | 'AdditionalDependencies': [ |
| 51 | 'OpenGL32.lib', |
| 52 | 'usp10.lib', |
| bungeman@google.com | f51e125 | 2013-06-05 18:35:22 +0000 | [diff] [blame] | 53 | |
| 54 | # Prior to gyp r1584, the following were included automatically. |
| 55 | 'kernel32.lib', |
| 56 | 'gdi32.lib', |
| 57 | 'winspool.lib', |
| 58 | 'comdlg32.lib', |
| 59 | 'advapi32.lib', |
| 60 | 'shell32.lib', |
| 61 | 'ole32.lib', |
| 62 | 'oleaut32.lib', |
| 63 | 'user32.lib', |
| 64 | 'uuid.lib', |
| 65 | 'odbc32.lib', |
| 66 | 'odbccp32.lib', |
| bsalomon@google.com | bbba784 | 2013-06-06 18:34:13 +0000 | [diff] [blame] | 67 | 'DelayImp.lib', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 68 | ], |
| 69 | }, |
| 70 | }, |
| 71 | 'configurations': { |
| 72 | 'Debug': { |
| 73 | 'msvs_settings': { |
| 74 | 'VCCLCompilerTool': { |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 75 | 'DebugInformationFormat': '4', # editAndContiue (/ZI) |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 76 | 'Optimization': '0', # optimizeDisabled (/Od) |
| 77 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 78 | 'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd) |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 79 | 'RuntimeTypeInfo': 'false', # /GR- |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 80 | }, |
| 81 | 'VCLinkerTool': { |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 82 | 'GenerateDebugInformation': 'true', # /DEBUG |
| 83 | 'LinkIncremental': '2', # /INCREMENTAL |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 84 | }, |
| 85 | }, |
| 86 | }, |
| 87 | 'Release': { |
| 88 | 'msvs_settings': { |
| 89 | 'VCCLCompilerTool': { |
| bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 90 | 'DebugInformationFormat': '3', # programDatabase (/Zi) |
| commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 91 | 'Optimization': '<(skia_release_optimization_level)', |
| bsalomon@google.com | d971869 | 2013-04-22 14:56:50 +0000 | [diff] [blame] | 92 | 'WholeProgramOptimization': 'true', #/GL |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 93 | # Changing the floating point model requires rebaseling gm images |
| bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 94 | #'FloatingPointModel': '2', # fast (/fp:fast) |
| 95 | 'FavorSizeOrSpeed': '1', # speed (/Ot) |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 96 | 'PreprocessorDefinitions': ['NDEBUG'], |
| bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 97 | 'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD) |
| bsalomon@google.com | 9aabfc7 | 2012-05-31 14:12:46 +0000 | [diff] [blame] | 98 | 'EnableEnhancedInstructionSet': '2',# /arch:SSE2 |
| 99 | 'RuntimeTypeInfo': 'false', # /GR- |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 100 | }, |
| 101 | 'VCLinkerTool': { |
| bsalomon@google.com | 8b5abec | 2011-09-28 14:32:01 +0000 | [diff] [blame] | 102 | 'GenerateDebugInformation': 'true', # /DEBUG |
| bsalomon@google.com | d971869 | 2013-04-22 14:56:50 +0000 | [diff] [blame] | 103 | 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 104 | }, |
| bungeman@google.com | 983297e | 2011-10-03 19:36:51 +0000 | [diff] [blame] | 105 | 'VCLibrarianTool': { |
| bsalomon@google.com | d971869 | 2013-04-22 14:56:50 +0000 | [diff] [blame] | 106 | 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG |
| bungeman@google.com | 983297e | 2011-10-03 19:36:51 +0000 | [diff] [blame] | 107 | }, |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 108 | }, |
| 109 | }, |
| 110 | }, |
| borenet@google.com | b796119 | 2012-08-20 18:58:26 +0000 | [diff] [blame] | 111 | 'conditions' : [ |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 112 | [ 'skia_arch_width == 64', { |
| bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 113 | 'msvs_configuration_platform': 'x64', |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 114 | }], |
| 115 | [ 'skia_arch_width == 32', { |
| 116 | 'msvs_configuration_platform': 'Win32', |
| 117 | }], |
| 118 | [ 'skia_warnings_as_errors', { |
| bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 119 | 'msvs_settings': { |
| 120 | 'VCCLCompilerTool': { |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 121 | 'WarnAsError': 'true', |
| 122 | 'AdditionalOptions': [ |
| 123 | '/we4189', # initialized but unused var warning |
| 124 | ], |
| bsalomon@google.com | 1d03ba9 | 2013-01-08 20:40:22 +0000 | [diff] [blame] | 125 | }, |
| 126 | }, |
| borenet@google.com | b796119 | 2012-08-20 18:58:26 +0000 | [diff] [blame] | 127 | }], |
| commit-bot@chromium.org | 5a6c2d8 | 2013-06-14 17:10:09 +0000 | [diff] [blame] | 128 | [ 'skia_win_exceptions', { |
| 129 | 'msvs_settings': { |
| 130 | 'VCCLCompilerTool': { |
| 131 | 'AdditionalOptions': [ |
| 132 | '/EHsc', |
| 133 | ], |
| 134 | }, |
| 135 | }, |
| 136 | }], |
| borenet@google.com | b796119 | 2012-08-20 18:58:26 +0000 | [diff] [blame] | 137 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 138 | }, |
| 139 | ], |
| 140 | |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 141 | # The following section is common to linux + derivatives and android |
| 142 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]', |
| 143 | { |
| 144 | 'conditions': [ |
| 145 | [ 'skia_warnings_as_errors', { |
| 146 | 'cflags': [ |
| 147 | '-Werror', |
| 148 | ], |
| 149 | }], |
| 150 | [ 'skia_arch_type == "arm" and arm_thumb == 1', { |
| 151 | 'cflags': [ |
| 152 | '-mthumb', |
| 153 | ], |
| djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 154 | # The --fix-cortex-a8 switch enables a link-time workaround for |
| 155 | # an erratum in certain Cortex-A8 processors. The workaround is |
| 156 | # enabled by default if you target the ARM v7-A arch profile. |
| 157 | # It can be enabled otherwise by specifying --fix-cortex-a8, or |
| 158 | # disabled unconditionally by specifying --no-fix-cortex-a8. |
| 159 | # |
| 160 | # The erratum only affects Thumb-2 code. |
| 161 | 'conditions': [ |
| 162 | [ 'arm_version < 7', { |
| 163 | 'ldflags': [ |
| 164 | '-Wl,--fix-cortex-a8', |
| 165 | ], |
| 166 | }], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 167 | ], |
| djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 168 | }], |
| 169 | [ 'skia_arch_type == "arm" and arm_version >= 7', { |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 170 | 'cflags': [ |
| 171 | '-march=armv7-a', |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 172 | ], |
| djsollen@google.com | f7542ba | 2013-07-31 12:57:27 +0000 | [diff] [blame] | 173 | 'ldflags': [ |
| 174 | '-march=armv7-a', |
| 175 | ], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 176 | 'conditions': [ |
| 177 | [ 'arm_neon == 1', { |
| 178 | 'defines': [ |
| 179 | '__ARM_HAVE_NEON', |
| 180 | ], |
| 181 | 'cflags': [ |
| 182 | '-mfpu=neon', |
| 183 | ], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 184 | }], |
| 185 | [ 'arm_neon_optional == 1', { |
| 186 | 'defines': [ |
| 187 | '__ARM_HAVE_OPTIONAL_NEON_SUPPORT', |
| 188 | ], |
| 189 | }], |
| borenet@google.com | e2b9037 | 2013-07-11 18:46:30 +0000 | [diff] [blame] | 190 | [ 'skia_os != "chromeos"', { |
| 191 | 'cflags': [ |
| 192 | '-mfloat-abi=softfp', |
| 193 | ], |
| 194 | }], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 195 | ], |
| 196 | }], |
| 197 | ], |
| 198 | }, |
| 199 | ], |
| 200 | |
| 201 | |
| borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 202 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 203 | { |
| 204 | 'defines': [ |
| 205 | 'SK_SAMPLES_FOR_X', |
| 206 | 'SK_BUILD_FOR_UNIX', |
| 207 | ], |
| 208 | 'configurations': { |
| 209 | 'Debug': { |
| 210 | 'cflags': ['-g'] |
| 211 | }, |
| 212 | 'Release': { |
| commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 213 | 'cflags': [ |
| 214 | '-O<(skia_release_optimization_level)', |
| 215 | '-g', |
| 216 | ], |
| senorblanco@chromium.org | 7288c49 | 2012-01-19 19:59:22 +0000 | [diff] [blame] | 217 | 'defines': [ 'NDEBUG' ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 218 | }, |
| 219 | }, |
| bsalomon@google.com | cadbcb8 | 2012-01-06 19:22:11 +0000 | [diff] [blame] | 220 | 'cflags': [ |
| bsalomon@google.com | 31648eb | 2011-11-23 15:01:08 +0000 | [diff] [blame] | 221 | '-Wall', |
| 222 | '-Wextra', |
| bsalomon@google.com | 31648eb | 2011-11-23 15:01:08 +0000 | [diff] [blame] | 223 | # suppressions below here were added for clang |
| 224 | '-Wno-unused-parameter', |
| 225 | '-Wno-c++11-extensions' |
| 226 | ], |
| borenet@google.com | a37a517 | 2012-08-09 20:44:32 +0000 | [diff] [blame] | 227 | 'conditions' : [ |
| zachr@google.com | 28c27c8 | 2013-06-20 17:15:05 +0000 | [diff] [blame] | 228 | [ 'skia_shared_lib', { |
| 229 | 'cflags': [ |
| 230 | '-fPIC', |
| 231 | ], |
| 232 | 'defines': [ |
| 233 | 'GR_DLL=1', |
| 234 | 'GR_IMPLEMENTATION=1', |
| 235 | 'SKIA_DLL', |
| 236 | 'SKIA_IMPLEMENTATION=1', |
| 237 | ], |
| 238 | }], |
| borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 239 | [ 'skia_os == "nacl"', { |
| 240 | 'defines': [ |
| 241 | 'SK_BUILD_FOR_NACL', |
| 242 | ], |
| 243 | 'link_settings': { |
| 244 | 'libraries': [ |
| 245 | '-lppapi', |
| 246 | '-lppapi_cpp', |
| 247 | '-lnosys', |
| 248 | '-pthread', |
| 249 | ], |
| 250 | }, |
| borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 251 | }], |
| borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 252 | [ 'skia_os == "chromeos"', { |
| 253 | 'ldflags': [ |
| borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 254 | '-lstdc++', |
| 255 | '-lm', |
| 256 | ], |
| 257 | }, { |
| 258 | 'conditions': [ |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 259 | [ 'skia_arch_width == 64 and skia_arch_type == "x86"', { |
| borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 260 | 'cflags': [ |
| 261 | '-m64', |
| 262 | ], |
| 263 | 'ldflags': [ |
| 264 | '-m64', |
| 265 | ], |
| 266 | }], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 267 | [ 'skia_arch_width == 32 and skia_arch_type == "x86"', { |
| borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 268 | 'cflags': [ |
| 269 | '-m32', |
| 270 | ], |
| 271 | 'ldflags': [ |
| 272 | '-m32', |
| 273 | ], |
| 274 | }], |
| 275 | ], |
| 276 | }], |
| borenet@google.com | 0d19309 | 2013-07-03 15:55:05 +0000 | [diff] [blame] | 277 | [ 'skia_asan_build', { |
| 278 | 'cflags': [ |
| 279 | '-fsanitize=address', |
| 280 | '-fno-omit-frame-pointer', |
| 281 | ], |
| 282 | 'ldflags': [ |
| 283 | '-fsanitize=address', |
| 284 | ], |
| 285 | }], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 286 | ], |
| 287 | }, |
| 288 | ], |
| 289 | |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 290 | [ 'skia_os == "mac"', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 291 | { |
| humper@google.com | 522dbd2 | 2013-02-08 21:45:33 +0000 | [diff] [blame] | 292 | 'variables': { |
| 293 | 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', |
| 294 | }, |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 295 | 'defines': [ |
| 296 | 'SK_BUILD_FOR_MAC', |
| reed@google.com | ebbda76 | 2013-08-07 15:30:09 +0000 | [diff] [blame^] | 297 | 'SK_FONTHOST_USES_FONTMGR', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 298 | ], |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 299 | 'conditions' : [ |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 300 | [ 'skia_arch_width == 64', { |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 301 | 'xcode_settings': { |
| commit-bot@chromium.org | 5d7ca95 | 2013-04-22 20:26:44 +0000 | [diff] [blame] | 302 | 'ARCHS': ['x86_64'], |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 303 | }, |
| 304 | }], |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 305 | [ 'skia_arch_width == 32', { |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 306 | 'xcode_settings': { |
| commit-bot@chromium.org | 5d7ca95 | 2013-04-22 20:26:44 +0000 | [diff] [blame] | 307 | 'ARCHS': ['i386'], |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 308 | }, |
| 309 | }], |
| 310 | [ 'skia_warnings_as_errors', { |
| 311 | 'xcode_settings': { |
| humper@google.com | fe0d680 | 2013-01-07 20:28:16 +0000 | [diff] [blame] | 312 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 313 | '-Werror', |
| commit-bot@chromium.org | faa5ae4 | 2013-07-23 11:13:56 +0000 | [diff] [blame] | 314 | '-Wall', |
| 315 | '-Wextra', |
| 316 | '-Wno-unused-parameter', |
| humper@google.com | fe0d680 | 2013-01-07 20:28:16 +0000 | [diff] [blame] | 317 | ], |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 318 | }, |
| 319 | }], |
| mtklein@google.com | 8d725b2 | 2013-07-24 16:20:05 +0000 | [diff] [blame] | 320 | # This old compiler is really bad at figuring out when things are uninitialized, so ignore it. |
| 321 | [ '<(mac_sdk)==10.6', { |
| 322 | 'xcode_settings': { |
| 323 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 324 | '-Wno-uninitialized', |
| 325 | ], |
| 326 | }, |
| 327 | }], |
| djsollen@google.com | e341cb3 | 2012-06-28 16:08:05 +0000 | [diff] [blame] | 328 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 329 | 'configurations': { |
| 330 | 'Debug': { |
| 331 | 'xcode_settings': { |
| 332 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 333 | }, |
| 334 | }, |
| reed@google.com | e05cc8e | 2011-10-10 14:19:40 +0000 | [diff] [blame] | 335 | 'Release': { |
| 336 | 'xcode_settings': { |
| commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 337 | 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)', |
| reed@google.com | e05cc8e | 2011-10-10 14:19:40 +0000 | [diff] [blame] | 338 | }, |
| senorblanco@chromium.org | 7288c49 | 2012-01-19 19:59:22 +0000 | [diff] [blame] | 339 | 'defines': [ 'NDEBUG' ], |
| reed@google.com | e05cc8e | 2011-10-10 14:19:40 +0000 | [diff] [blame] | 340 | }, |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 341 | }, |
| 342 | 'xcode_settings': { |
| robertphillips@google.com | 0229765 | 2012-04-05 19:29:04 +0000 | [diff] [blame] | 343 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
| humper@google.com | 522dbd2 | 2013-02-08 21:45:33 +0000 | [diff] [blame] | 344 | 'conditions': [ |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 345 | [ 'skia_osx_sdkroot==""', { |
| humper@google.com | 522dbd2 | 2013-02-08 21:45:33 +0000 | [diff] [blame] | 346 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 347 | }, { |
| 348 | 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot |
| 349 | }], |
| 350 | ], |
| reed@google.com | 0069aa5 | 2011-11-17 15:35:47 +0000 | [diff] [blame] | 351 | # trying to get this to work, but it needs clang I think... |
| 352 | # 'WARNING_CFLAGS': '-Wexit-time-destructors', |
| mike@reedtribe.org | e51755f | 2011-12-10 19:36:56 +0000 | [diff] [blame] | 353 | 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
| caryclark@google.com | b462a42 | 2012-06-06 12:12:28 +0000 | [diff] [blame] | 354 | 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES', |
| 355 | 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES', |
| 356 | 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES', |
| 357 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', |
| 358 | 'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES', |
| 359 | 'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES', |
| 360 | 'GCC_WARN_ABOUT_RETURN_TYPE': 'YES', |
| 361 | 'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES', |
| 362 | 'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES', |
| 363 | 'GCC_WARN_MISSING_PARENTHESES': 'YES', |
| 364 | 'GCC_WARN_PROTOTYPE_CONVERSION': 'YES', |
| 365 | 'GCC_WARN_SIGN_COMPARE': 'YES', |
| 366 | 'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES', |
| 367 | 'GCC_WARN_UNKNOWN_PRAGMAS': 'YES', |
| 368 | 'GCC_WARN_UNUSED_FUNCTION': 'YES', |
| 369 | 'GCC_WARN_UNUSED_LABEL': 'YES', |
| 370 | 'GCC_WARN_UNUSED_VALUE': 'YES', |
| 371 | 'GCC_WARN_UNUSED_VARIABLE': 'YES', |
| bungeman@google.com | 43b4ed5 | 2012-10-02 15:42:21 +0000 | [diff] [blame] | 372 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 373 | '-mssse3', |
| 374 | '-fvisibility=hidden', |
| 375 | '-fvisibility-inlines-hidden', |
| 376 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 377 | }, |
| 378 | }, |
| 379 | ], |
| 380 | |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 381 | [ 'skia_os == "ios"', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 382 | { |
| 383 | 'defines': [ |
| 384 | 'SK_BUILD_FOR_IOS', |
| 385 | ], |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 386 | 'conditions' : [ |
| 387 | [ 'skia_warnings_as_errors', { |
| 388 | 'xcode_settings': { |
| 389 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 390 | '-Werror', |
| 391 | ], |
| 392 | }, |
| 393 | }], |
| 394 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 395 | 'configurations': { |
| 396 | 'Debug': { |
| 397 | 'xcode_settings': { |
| 398 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 399 | }, |
| 400 | }, |
| caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 401 | 'Release': { |
| 402 | 'xcode_settings': { |
| commit-bot@chromium.org | 06b3864 | 2013-06-20 20:28:54 +0000 | [diff] [blame] | 403 | 'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)', |
| caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 404 | }, |
| 405 | 'defines': [ 'NDEBUG' ], |
| 406 | }, |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 407 | }, |
| 408 | 'xcode_settings': { |
| commit-bot@chromium.org | 5d7ca95 | 2013-04-22 20:26:44 +0000 | [diff] [blame] | 409 | 'ARCHS': ['armv6', 'armv7'], |
| caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 410 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 411 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 412 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', |
| caryclark@google.com | 867cbd8 | 2012-09-20 15:45:41 +0000 | [diff] [blame] | 413 | 'SDKROOT': 'iphoneos', |
| caryclark@google.com | 594dd3c | 2012-09-24 19:33:57 +0000 | [diff] [blame] | 414 | 'TARGETED_DEVICE_FAMILY': '1,2', |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 415 | 'OTHER_CPLUSPLUSFLAGS': [ |
| 416 | '-fvisibility=hidden', |
| 417 | '-fvisibility-inlines-hidden', |
| 418 | ], |
| bsalomon@google.com | 89dec58 | 2012-09-28 18:33:11 +0000 | [diff] [blame] | 419 | 'GCC_THUMB_SUPPORT': 'NO', |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 420 | }, |
| 421 | }, |
| 422 | ], |
| chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 423 | |
| borenet@google.com | a72aef8 | 2013-03-22 13:16:06 +0000 | [diff] [blame] | 424 | [ 'skia_os == "android"', |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 425 | { |
| 426 | 'defines': [ |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 427 | 'SK_BUILD_FOR_ANDROID', |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 428 | ], |
| 429 | 'configurations': { |
| 430 | 'Debug': { |
| 431 | 'cflags': ['-g'] |
| 432 | }, |
| 433 | 'Release': { |
| djsollen@google.com | bde506c | 2013-04-04 19:42:51 +0000 | [diff] [blame] | 434 | 'cflags': ['-O2'], |
| senorblanco@chromium.org | 7288c49 | 2012-01-19 19:59:22 +0000 | [diff] [blame] | 435 | 'defines': [ 'NDEBUG' ], |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 436 | }, |
| 437 | }, |
| 438 | 'libraries': [ |
| 439 | '-lstdc++', |
| 440 | '-lm', |
| djsollen@google.com | 318cf92 | 2011-11-08 19:03:43 +0000 | [diff] [blame] | 441 | '-llog', |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 442 | ], |
| djsollen@google.com | 44360bc | 2011-12-05 13:55:55 +0000 | [diff] [blame] | 443 | 'cflags': [ |
| djsollen@google.com | efbe8e9 | 2013-02-07 18:58:35 +0000 | [diff] [blame] | 444 | '-Wall', |
| djsollen@google.com | 44360bc | 2011-12-05 13:55:55 +0000 | [diff] [blame] | 445 | '-fno-exceptions', |
| djsollen@google.com | efbe8e9 | 2013-02-07 18:58:35 +0000 | [diff] [blame] | 446 | '-fstrict-aliasing', |
| borenet@google.com | de9ac14 | 2012-07-25 15:17:03 +0000 | [diff] [blame] | 447 | '-fuse-ld=gold', |
| djsollen@google.com | 44360bc | 2011-12-05 13:55:55 +0000 | [diff] [blame] | 448 | ], |
| reed@google.com | e52d291 | 2013-05-15 20:01:07 +0000 | [diff] [blame] | 449 | 'cflags_cc': [ |
| 450 | '-fno-rtti', |
| 451 | ], |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 452 | 'conditions': [ |
| djsollen@google.com | 52f0297 | 2013-06-03 12:10:19 +0000 | [diff] [blame] | 453 | [ 'skia_shared_lib', { |
| 454 | 'cflags': [ |
| 455 | '-fPIC', |
| 456 | ], |
| 457 | 'defines': [ |
| 458 | 'GR_DLL=1', |
| 459 | 'GR_IMPLEMENTATION=1', |
| 460 | 'SKIA_DLL', |
| 461 | 'SKIA_IMPLEMENTATION=1', |
| 462 | ], |
| 463 | }], |
| commit-bot@chromium.org | 183f7f5 | 2013-07-11 12:48:14 +0000 | [diff] [blame] | 464 | [ 'skia_profile_enabled == 1', { |
| 465 | 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], |
| djsollen@google.com | 3839ca1 | 2011-11-03 17:31:41 +0000 | [diff] [blame] | 466 | }], |
| chudy@google.com | bbad34d | 2012-08-13 14:26:36 +0000 | [diff] [blame] | 467 | ], |
| djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 468 | }, |
| 469 | ], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 470 | |
| digit@google.com | 1771cbf | 2012-01-26 21:26:40 +0000 | [diff] [blame] | 471 | # We can POD-style initialization of static mutexes to avoid generating |
| 472 | # static initializers if we're using a pthread-compatible thread interface. |
| 473 | [ 'skia_os != "win"', { |
| 474 | 'defines': [ |
| borenet@google.com | 7158e6a | 2012-11-01 17:43:44 +0000 | [diff] [blame] | 475 | 'SK_USE_POSIX_THREADS', |
| digit@google.com | 1771cbf | 2012-01-26 21:26:40 +0000 | [diff] [blame] | 476 | ], |
| 477 | }], |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 478 | ], # end 'conditions' |
| caryclark@google.com | 4588ce8 | 2012-09-26 15:48:43 +0000 | [diff] [blame] | 479 | # The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details |
| 480 | 'xcode_settings': { |
| 481 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 482 | }, |
| seanpaul@google.com | 1134f98 | 2011-09-15 14:24:33 +0000 | [diff] [blame] | 483 | } |
| 484 | |
| 485 | # Local Variables: |
| 486 | # tab-width:2 |
| 487 | # indent-tabs-mode:nil |
| 488 | # End: |
| 489 | # vim: set expandtab tabstop=2 shiftwidth=2: |