OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 # This gyp file contains the platform-specific optimizations for Skia | 6 # This gyp file contains the platform-specific optimizations for Skia |
7 { | 7 { |
8 'targets': [ | 8 'targets': [ |
9 # Due to an unfortunate intersection of lameness between gcc and gyp, | 9 # Due to an unfortunate intersection of lameness between gcc and gyp, |
Reid Kleckner
2014/08/15 00:40:02
I feel guilty for propagating this "lameness" to c
| |
10 # we have to build the *_SSE2.cpp files in a separate target. The | 10 # we have to build the *_SSE2.cpp files in a separate target. The |
11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 11 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
12 # must be passed the -msse2 flag. However, with this flag, it may | 12 # must be passed the -msse2 flag. However, with this flag, it may |
13 # emit SSE2 instructions even for scalar code, such as the CPUID | 13 # emit SSE2 instructions even for scalar code, such as the CPUID |
14 # test used to test for the presence of SSE2. So that, and all other | 14 # test used to test for the presence of SSE2. So that, and all other |
15 # code must be compiled *without* -msse2. The gyp lameness is that it | 15 # code must be compiled *without* -msse2. The gyp lameness is that it |
16 # does not allow file-specific CFLAGS, so we must create this extra | 16 # does not allow file-specific CFLAGS, so we must create this extra |
17 # target for those files to be compiled with -msse2. | 17 # target for those files to be compiled with -msse2. |
18 # | 18 # |
19 # This is actually only a problem on 32-bit Linux (all Intel Macs have | 19 # This is actually only a problem on 32-bit Linux (all Intel Macs have |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { | 170 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { |
171 'cflags': [ | 171 'cflags': [ |
172 '-mssse3', | 172 '-mssse3', |
173 ], | 173 ], |
174 }], | 174 }], |
175 [ 'OS == "mac"', { | 175 [ 'OS == "mac"', { |
176 'xcode_settings': { | 176 'xcode_settings': { |
177 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', | 177 'GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS': 'YES', |
178 }, | 178 }, |
179 }], | 179 }], |
180 [ 'OS == "win" and clang == 1', { | |
181 # cl.exe's /arch flag doesn't have a setting for SSSE3, and cl.exe | |
182 # doesn't need it for intrinsics. clang-cl does need it, though. | |
183 'msvs_settings': { | |
184 'VCCLCompilerTool': { 'AdditionalOptions': [ '-mssse3' ] }, | |
185 }, | |
186 }], | |
180 [ 'OS == "win"', { | 187 [ 'OS == "win"', { |
181 'include_dirs': [ | 188 'include_dirs': [ |
182 'config/win', | 189 'config/win', |
183 ], | 190 ], |
184 'direct_dependent_settings': { | 191 'direct_dependent_settings': { |
185 'include_dirs': [ | 192 'include_dirs': [ |
186 'config/win', | 193 'config/win', |
187 ], | 194 ], |
188 }, | 195 }, |
189 'defines' : [ | 196 'defines' : [ |
(...skipping 29 matching lines...) Expand all Loading... | |
219 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { | 226 [ 'OS in ["linux", "freebsd", "openbsd", "solaris", "android"]', { |
220 'cflags': [ | 227 'cflags': [ |
221 '-msse4.1', | 228 '-msse4.1', |
222 ], | 229 ], |
223 }], | 230 }], |
224 [ 'OS == "mac"', { | 231 [ 'OS == "mac"', { |
225 'xcode_settings': { | 232 'xcode_settings': { |
226 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES', | 233 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES', |
227 }, | 234 }, |
228 }], | 235 }], |
236 [ 'OS == "win" and clang == 1', { | |
237 # cl.exe's /arch flag doesn't have a setting for SSE4.1, and cl.exe | |
238 # doesn't need it for intrinsics. clang-cl does need it, though. | |
239 'msvs_settings': { | |
240 'VCCLCompilerTool': { 'AdditionalOptions': [ '-msse4.1' ] }, | |
241 }, | |
242 }], | |
229 [ 'OS == "win"', { | 243 [ 'OS == "win"', { |
230 'defines' : [ | 244 'defines' : [ |
231 'SK_CPU_SSE_LEVEL=41' | 245 'SK_CPU_SSE_LEVEL=41' |
232 ], | 246 ], |
233 }], | 247 }], |
234 [ 'target_arch == "x64"', { | 248 [ 'target_arch == "x64"', { |
235 'sources': [ | 249 'sources': [ |
236 '../third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S', | 250 '../third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S', |
237 ], | 251 ], |
238 }], | 252 }], |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 '../third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp', | 327 '../third_party/skia/src/opts/SkTextureCompression_opts_neon.cpp', |
314 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', | 328 '../third_party/skia/src/opts/SkXfermode_opts_arm_neon.cpp', |
315 '../third_party/skia/src/opts/memset16_neon.S', | 329 '../third_party/skia/src/opts/memset16_neon.S', |
316 '../third_party/skia/src/opts/memset32_neon.S', | 330 '../third_party/skia/src/opts/memset32_neon.S', |
317 ], | 331 ], |
318 }, | 332 }, |
319 ], | 333 ], |
320 }], | 334 }], |
321 ], | 335 ], |
322 } | 336 } |
OLD | NEW |