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