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