OLD | NEW |
1 # Gyp file for opts projects | 1 # Gyp file for opts projects |
2 { | 2 { |
3 'targets': [ | 3 'targets': [ |
4 # Due to an unfortunate intersection of lameness between gcc and gyp, | 4 # Due to an unfortunate intersection of lameness between gcc and gyp, |
5 # we have to build the *_SSE2.cpp files in a separate target. The | 5 # we have to build the *_SSE2.cpp files in a separate target. The |
6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it | 6 # gcc lameness is that, in order to compile SSE2 intrinsics code, it |
7 # must be passed the -msse2 flag. However, with this flag, it may | 7 # must be passed the -msse2 flag. However, with this flag, it may |
8 # emit SSE2 instructions even for scalar code, such as the CPUID | 8 # emit SSE2 instructions even for scalar code, such as the CPUID |
9 # test used to test for the presence of SSE2. So that, and all other | 9 # test used to test for the presence of SSE2. So that, and all other |
10 # code must be compiled *without* -msse2. The gyp lameness is that it | 10 # code must be compiled *without* -msse2. The gyp lameness is that it |
(...skipping 28 matching lines...) Expand all Loading... |
39 'cflags': [ | 39 'cflags': [ |
40 '-msse2', | 40 '-msse2', |
41 ], | 41 ], |
42 }], | 42 }], |
43 ], | 43 ], |
44 'include_dirs': [ | 44 'include_dirs': [ |
45 '../include/utils', | 45 '../include/utils', |
46 ], | 46 ], |
47 'dependencies': [ | 47 'dependencies': [ |
48 'opts_ssse3', | 48 'opts_ssse3', |
49 'opts_sse4', | |
50 ], | 49 ], |
51 'sources': [ | 50 'sources': [ |
52 '../src/opts/opts_check_x86.cpp', | 51 '../src/opts/opts_check_x86.cpp', |
53 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', | 52 '../src/opts/SkBitmapProcState_opts_SSE2.cpp', |
54 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', | 53 '../src/opts/SkBitmapFilter_opts_SSE2.cpp', |
55 '../src/opts/SkBlitRow_opts_SSE2.cpp', | 54 '../src/opts/SkBlitRow_opts_SSE2.cpp', |
56 '../src/opts/SkBlitRect_opts_SSE2.cpp', | 55 '../src/opts/SkBlitRect_opts_SSE2.cpp', |
57 '../src/opts/SkBlurImage_opts_SSE2.cpp', | 56 '../src/opts/SkBlurImage_opts_SSE2.cpp', |
58 '../src/opts/SkMorphology_opts_SSE2.cpp', | 57 '../src/opts/SkMorphology_opts_SSE2.cpp', |
59 '../src/opts/SkUtils_opts_SSE2.cpp', | 58 '../src/opts/SkUtils_opts_SSE2.cpp', |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 ], | 165 ], |
167 }], | 166 }], |
168 # (Mac has -mssse3 globally.) | 167 # (Mac has -mssse3 globally.) |
169 [ 'skia_arch_type == "x86"', { | 168 [ 'skia_arch_type == "x86"', { |
170 'sources': [ | 169 'sources': [ |
171 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', | 170 '../src/opts/SkBitmapProcState_opts_SSSE3.cpp', |
172 ], | 171 ], |
173 }], | 172 }], |
174 ], | 173 ], |
175 }, | 174 }, |
176 # For the same lame reasons as what is done for skia_opts, we also have to | |
177 # create another target specifically for SSE4 code as we would not want | |
178 # to compile the SSE2 code with -msse4 which would potentially allow | |
179 # gcc to generate SSE4 code. | |
180 { | |
181 'target_name': 'opts_sse4', | |
182 'product_name': 'skia_opts_sse4', | |
183 'type': 'static_library', | |
184 'standalone_static_library': 1, | |
185 'dependencies': [ | |
186 'core.gyp:*', | |
187 'effects.gyp:*' | |
188 ], | |
189 'include_dirs': [ | |
190 '../src/core', | |
191 ], | |
192 'conditions': [ | |
193 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chrome
os", "android", "mac"] \ | |
194 and not skia_android_framework', { | |
195 'cflags': [ | |
196 '-msse4', | |
197 ], | |
198 }], | |
199 [ 'skia_arch_width == 64 and skia_arch_type == "x86"', { | |
200 'sources': [ | |
201 '../src/opts/SkBlitRow_opts_SSE4_x64_asm.S', | |
202 ], | |
203 }], | |
204 [ 'skia_arch_width == 32 and skia_arch_type == "x86"', { | |
205 'sources': [ | |
206 '../src/opts/SkBlitRow_opts_SSE4_asm.S', | |
207 ], | |
208 }], | |
209 ], | |
210 }, | |
211 # NEON code must be compiled with -mfpu=neon which also affects scalar | 175 # NEON code must be compiled with -mfpu=neon which also affects scalar |
212 # code. To support dynamic NEON code paths, we need to build all | 176 # code. To support dynamic NEON code paths, we need to build all |
213 # NEON-specific sources in a separate static library. The situation | 177 # NEON-specific sources in a separate static library. The situation |
214 # is very similar to the SSSE3 and SSE4 one. | 178 # is very similar to the SSSE3 one. |
215 { | 179 { |
216 'target_name': 'opts_neon', | 180 'target_name': 'opts_neon', |
217 'product_name': 'skia_opts_neon', | 181 'product_name': 'skia_opts_neon', |
218 'type': 'static_library', | 182 'type': 'static_library', |
219 'standalone_static_library': 1, | 183 'standalone_static_library': 1, |
220 'dependencies': [ | 184 'dependencies': [ |
221 'core.gyp:*', | 185 'core.gyp:*', |
222 'effects.gyp:*' | 186 'effects.gyp:*' |
223 ], | 187 ], |
224 'include_dirs': [ | 188 'include_dirs': [ |
(...skipping 26 matching lines...) Expand all Loading... |
251 '../src/opts/SkBitmapProcState_matrix_neon.h', | 215 '../src/opts/SkBitmapProcState_matrix_neon.h', |
252 '../src/opts/SkBlitMask_opts_arm_neon.cpp', | 216 '../src/opts/SkBlitMask_opts_arm_neon.cpp', |
253 '../src/opts/SkBlitRow_opts_arm_neon.cpp', | 217 '../src/opts/SkBlitRow_opts_arm_neon.cpp', |
254 '../src/opts/SkBlurImage_opts_neon.cpp', | 218 '../src/opts/SkBlurImage_opts_neon.cpp', |
255 '../src/opts/SkMorphology_opts_neon.cpp', | 219 '../src/opts/SkMorphology_opts_neon.cpp', |
256 '../src/opts/SkXfermode_opts_arm_neon.cpp', | 220 '../src/opts/SkXfermode_opts_arm_neon.cpp', |
257 ], | 221 ], |
258 }, | 222 }, |
259 ], | 223 ], |
260 } | 224 } |
OLD | NEW |