OLD | NEW |
1 # Copyright 2015 Google Inc. | 1 # Copyright 2015 Google Inc. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 # Gyp file for building opts target. | 5 # Gyp file for building opts target. |
6 { | 6 { |
7 # Source lists live in opts.gypi. This makes it easier to maintain our Chrome
GYP/GN setup. | 7 # Source lists live in opts.gypi. This makes it easier to maintain our Chrome
GYP/GN setup. |
8 # (To be honest, I'm not sure why we need to include common.gypi. I thought i
t was automatic.) | 8 # (To be honest, I'm not sure why we need to include common.gypi. I thought i
t was automatic.) |
9 'variables': { | 9 'variables': { |
10 'includes': [ 'common.gypi', 'opts.gypi' ], | 10 'includes': [ 'common.gypi', 'opts.gypi' ], |
11 }, | 11 }, |
12 | 12 |
13 # Generally we shove things into one 'opts' target conditioned on platform. | 13 # Generally we shove things into one 'opts' target conditioned on platform. |
14 # If a particular platform needs some files built with different flags, | 14 # If a particular platform needs some files built with different flags, |
15 # those become separate targets: opts_ssse3, opts_sse41, opts_neon. | 15 # those become separate targets: opts_ssse3, opts_sse41, opts_neon. |
16 | 16 |
17 'targets': [ | 17 'targets': [ |
18 { | 18 { |
19 'target_name': 'opts', | 19 'target_name': 'opts', |
20 'product_name': 'skia_opts', | 20 'product_name': 'skia_opts', |
21 'type': 'static_library', | 21 'type': 'static_library', |
22 'standalone_static_library': 1, | 22 'standalone_static_library': 1, |
23 'dependencies': [ | 23 'dependencies': [ |
24 'core.gyp:*', | 24 'core.gyp:*', |
25 'effects.gyp:*' | 25 'effects.gyp:*' |
26 ], | 26 ], |
27 'include_dirs': [ | 27 'include_dirs': [ |
| 28 '../include/private', |
28 '../src/core', | 29 '../src/core', |
29 '../src/opts', | 30 '../src/opts', |
30 '../src/utils', | 31 '../src/utils', |
31 '../include/utils', | 32 '../include/utils', |
32 ], | 33 ], |
33 'conditions': [ | 34 'conditions': [ |
34 [ '"x86" in skia_arch_type and skia_os != "ios"', { | 35 [ '"x86" in skia_arch_type and skia_os != "ios"', { |
35 'cflags': [ '-msse2' ], | 36 'cflags': [ '-msse2' ], |
36 'dependencies': [ 'opts_ssse3', 'opts_sse41' ], | 37 'dependencies': [ 'opts_ssse3', 'opts_sse41' ], |
37 'sources': [ '<@(sse2_sources)' ], | 38 'sources': [ '<@(sse2_sources)' ], |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 ] | 82 ] |
82 }], | 83 }], |
83 ], | 84 ], |
84 }, | 85 }, |
85 { | 86 { |
86 'target_name': 'opts_ssse3', | 87 'target_name': 'opts_ssse3', |
87 'product_name': 'skia_opts_ssse3', | 88 'product_name': 'skia_opts_ssse3', |
88 'type': 'static_library', | 89 'type': 'static_library', |
89 'standalone_static_library': 1, | 90 'standalone_static_library': 1, |
90 'dependencies': [ 'core.gyp:*' ], | 91 'dependencies': [ 'core.gyp:*' ], |
91 'include_dirs': [ '../src/core' ], | 92 'include_dirs': [ |
| 93 '../include/private', |
| 94 '../src/core', |
| 95 ], |
92 'sources': [ '<@(ssse3_sources)' ], | 96 'sources': [ '<@(ssse3_sources)' ], |
93 'conditions': [ | 97 'conditions': [ |
94 [ 'skia_os == "win"', { | 98 [ 'skia_os == "win"', { |
95 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ], | 99 'defines' : [ 'SK_CPU_SSE_LEVEL=31' ], |
96 }], | 100 }], |
97 [ 'not skia_android_framework', { | 101 [ 'not skia_android_framework', { |
98 'cflags': [ '-mssse3' ], | 102 'cflags': [ '-mssse3' ], |
99 }], | 103 }], |
100 ], | 104 ], |
101 }, | 105 }, |
102 { | 106 { |
103 'target_name': 'opts_sse41', | 107 'target_name': 'opts_sse41', |
104 'product_name': 'skia_opts_sse41', | 108 'product_name': 'skia_opts_sse41', |
105 'type': 'static_library', | 109 'type': 'static_library', |
106 'standalone_static_library': 1, | 110 'standalone_static_library': 1, |
107 'dependencies': [ 'core.gyp:*' ], | 111 'dependencies': [ 'core.gyp:*' ], |
| 112 'include_dirs': [ |
| 113 '../include/private', |
| 114 '../src/core', |
| 115 ], |
108 'sources': [ '<@(sse41_sources)' ], | 116 'sources': [ '<@(sse41_sources)' ], |
109 'conditions': [ | 117 'conditions': [ |
110 [ 'skia_os == "win"', { | 118 [ 'skia_os == "win"', { |
111 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], | 119 'defines' : [ 'SK_CPU_SSE_LEVEL=41' ], |
112 }], | 120 }], |
113 [ 'not skia_android_framework', { | 121 [ 'not skia_android_framework', { |
114 'cflags': [ '-msse4.1' ], | 122 'cflags': [ '-msse4.1' ], |
115 }], | 123 }], |
116 [ 'skia_os == "mac"', { | 124 [ 'skia_os == "mac"', { |
117 'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' }, | 125 'xcode_settings': { 'GCC_ENABLE_SSE41_EXTENSIONS': 'YES' }, |
118 }], | 126 }], |
119 ], | 127 ], |
120 }, | 128 }, |
121 { | 129 { |
122 'target_name': 'opts_neon', | 130 'target_name': 'opts_neon', |
123 'product_name': 'skia_opts_neon', | 131 'product_name': 'skia_opts_neon', |
124 'type': 'static_library', | 132 'type': 'static_library', |
125 'standalone_static_library': 1, | 133 'standalone_static_library': 1, |
126 'dependencies': [ | 134 'dependencies': [ |
127 'core.gyp:*', | 135 'core.gyp:*', |
128 'effects.gyp:*' | 136 'effects.gyp:*' |
129 ], | 137 ], |
130 'include_dirs': [ | 138 'include_dirs': [ |
| 139 '../include/private', |
131 '../src/core', | 140 '../src/core', |
132 '../src/opts', | 141 '../src/opts', |
133 '../src/utils', | 142 '../src/utils', |
134 ], | 143 ], |
135 'sources': [ '<@(neon_sources)' ], | 144 'sources': [ '<@(neon_sources)' ], |
136 'cflags!': [ | 145 'cflags!': [ |
137 '-fno-omit-frame-pointer', | 146 '-fno-omit-frame-pointer', |
138 '-mfpu=vfp', # remove them all, just in case. | 147 '-mfpu=vfp', # remove them all, just in case. |
139 '-mfpu=vfpv3', | 148 '-mfpu=vfpv3', |
140 '-mfpu=vfpv3-d16', | 149 '-mfpu=vfpv3-d16', |
141 ], | 150 ], |
142 'conditions': [ | 151 'conditions': [ |
143 [ 'not skia_android_framework', { | 152 [ 'not skia_android_framework', { |
144 'cflags': [ | 153 'cflags': [ |
145 '-mfpu=neon', | 154 '-mfpu=neon', |
146 '-fomit-frame-pointer', | 155 '-fomit-frame-pointer', |
147 ], | 156 ], |
148 }], | 157 }], |
149 ], | 158 ], |
150 'ldflags': [ | 159 'ldflags': [ |
151 '-march=armv7-a', | 160 '-march=armv7-a', |
152 '-Wl,--fix-cortex-a8', | 161 '-Wl,--fix-cortex-a8', |
153 ], | 162 ], |
154 }, | 163 }, |
155 ], | 164 ], |
156 } | 165 } |
OLD | NEW |