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