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