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