Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: skia/skia_library_opts.gyp

Issue 1161853008: skia: Simplify SSE2 logic a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ios Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « skia/skia_chrome.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # This gyp file contains the platform-specific optimizations for Skia 5 # This gyp file contains the platform-specific optimizations for Skia
6 { 6 {
7 'variables': { 7 'variables': {
8 'skia_src_path': '../third_party/skia/src', 8 'skia_src_path': '../third_party/skia/src',
9 'includes': [ '../third_party/skia/gyp/opts.gypi' ], 9 'includes': [ '../third_party/skia/gyp/opts.gypi' ],
10 'include_dirs': [ 10 'include_dirs': [
11 '../third_party/skia/include/core', 11 '../third_party/skia/include/core',
12 '../third_party/skia/include/effects', 12 '../third_party/skia/include/effects',
13 '../third_party/skia/include/utils', 13 '../third_party/skia/include/utils',
14 '../third_party/skia/src/core', 14 '../third_party/skia/src/core',
15 '../third_party/skia/src/opts', 15 '../third_party/skia/src/opts',
16 '../third_party/skia/src/utils', 16 '../third_party/skia/src/utils',
17 ], 17 ],
18 }, 18 },
19 19
20 'targets': [ 20 'targets': [
21 # Due to an unfortunate intersection of lameness between gcc and gyp, 21 # SSE files have to be built in a separate target, because gcc needs
22 # we have to build the *_SSE2.cpp files in a separate target. The 22 # different -msse flags for different SSE levels which enable use of SSE
23 # gcc lameness is that, in order to compile SSE2 intrinsics code, it 23 # intrinsics but also allow emission of SSE2 instructions for scalar code.
24 # must be passed the -msse2 flag. However, with this flag, it may 24 # gyp does not allow per-file compiler flags.
25 # emit SSE2 instructions even for scalar code, such as the CPUID
26 # test used to test for the presence of SSE2. So that, and all other
27 # code must be compiled *without* -msse2. The gyp lameness is that it
28 # does not allow file-specific CFLAGS, so we must create this extra
29 # target for those files to be compiled with -msse2.
30 #
31 # This is actually only a problem on 32-bit Linux (all Intel Macs have
32 # SSE2, Linux x86_64 has SSE2 by definition, and MSC will happily emit
33 # SSE2 from instrinsics, which generating plain ol' 386 for everything
34 # else). However, to keep the .gyp file simple and avoid platform-specific
35 # build breakage, we do this on all platforms.
36
37 # For about the same reason, we need to compile the ARM opts files 25 # For about the same reason, we need to compile the ARM opts files
38 # separately as well. 26 # separately as well.
39 { 27 {
40 'target_name': 'skia_opts', 28 'target_name': 'skia_opts',
41 'type': 'static_library', 29 'type': 'static_library',
42 'includes': [ 30 'includes': [
43 'skia_common.gypi', 31 'skia_common.gypi',
44 '../build/android/increase_size_for_speed.gypi', 32 '../build/android/increase_size_for_speed.gypi',
45 # Disable LTO due to compiler error 33 # Disable LTO due to compiler error
46 # in mems_in_disjoint_alias_sets_p, at alias.c:393 34 # in mems_in_disjoint_alias_sets_p, at alias.c:393
47 # crbug.com/422255 35 # crbug.com/422255
48 '../build/android/disable_lto.gypi', 36 '../build/android/disable_lto.gypi',
49 ], 37 ],
50 'include_dirs': [ '<@(include_dirs)' ], 38 'include_dirs': [ '<@(include_dirs)' ],
51 'conditions': [ 39 'conditions': [
52 [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
53 target_arch != "arm" and target_arch != "arm64" and \
54 target_arch != "mipsel" and target_arch != "mips64el"', {
55 'cflags': [ '-msse2' ],
56 }],
57 [ 'target_arch != "arm" and target_arch != "mipsel" and \ 40 [ 'target_arch != "arm" and target_arch != "mipsel" and \
58 target_arch != "arm64" and target_arch != "mips64el"', { 41 target_arch != "arm64" and target_arch != "mips64el"', {
42 # Chrome builds with -msse2 locally, so sse2_sources could in theory
43 # be in the regular skia target. But we need skia_opts for arm
44 # anyway, so putting sse2_sources here is simpler than making this
45 # conditionally a type none target on x86.
59 'sources': [ '<@(sse2_sources)' ], 46 'sources': [ '<@(sse2_sources)' ],
60 'dependencies': [ 47 'dependencies': [
61 'skia_opts_ssse3', 48 'skia_opts_ssse3',
62 'skia_opts_sse41', 49 'skia_opts_sse41',
63 ], 50 ],
64 }], 51 }],
65 [ 'target_arch == "arm"', { 52 [ 'target_arch == "arm"', {
66 'conditions': [ 53 'conditions': [
67 [ 'arm_version >= 7', { 54 [ 'arm_version >= 7', {
68 'sources': [ '<@(armv7_sources)' ], 55 'sources': [ '<@(armv7_sources)' ],
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 'ldflags': [ 207 'ldflags': [
221 '-march=armv7-a', 208 '-march=armv7-a',
222 '-Wl,--fix-cortex-a8', 209 '-Wl,--fix-cortex-a8',
223 ], 210 ],
224 'sources': [ '<@(neon_sources)' ], 211 'sources': [ '<@(neon_sources)' ],
225 }, 212 },
226 ], 213 ],
227 }], 214 }],
228 ], 215 ],
229 } 216 }
OLDNEW
« no previous file with comments | « skia/skia_chrome.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698