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