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