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

Side by Side Diff: BUILD.gn

Issue 1272583003: Break GN targets apart by library (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | generate_gypi.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import("//build/config/arm.gni") 5 import("//build/config/arm.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/chrome_build.gni") 7 import("//build/config/chrome_build.gni")
8 import("//third_party/libvpx/libvpx_srcs.gni") 8 import("//third_party/libvpx/libvpx_srcs.gni")
9 import("//third_party/yasm/yasm_assemble.gni") 9 import("//third_party/yasm/yasm_assemble.gni")
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 } 48 }
49 49
50 # This config is applied to targets that depend on libvpx. 50 # This config is applied to targets that depend on libvpx.
51 config("libvpx_external_config") { 51 config("libvpx_external_config") {
52 include_dirs = [ 52 include_dirs = [
53 "//third_party/libvpx/source/libvpx", 53 "//third_party/libvpx/source/libvpx",
54 ] 54 ]
55 } 55 }
56 56
57 # GN requires distinct targets because it relies on the basename to avoid
58 # naming conflicts.
57 if (current_cpu == "x86" || current_cpu == "x64") { 59 if (current_cpu == "x86" || current_cpu == "x64") {
58 yasm_assemble("libvpx_yasm") { 60 yasm_assemble("libvpx_yasm") {
59 if (current_cpu == "x86") { 61 if (current_cpu == "x86") {
60 sources = libvpx_srcs_x86_assembly 62 sources = libvpx_srcs_x86_assembly
61 } else if (current_cpu == "x64") { 63 } else if (current_cpu == "x64") {
62 sources = libvpx_srcs_x86_64_assembly 64 sources = libvpx_srcs_x86_64_assembly
63 } 65 }
64 66
65 defines = [ "CHROMIUM" ] 67 defines = [ "CHROMIUM" ]
66 include_dirs = [ 68 include_dirs = [
67 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full", 69 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full",
68 "//third_party/libvpx/source/config", 70 "//third_party/libvpx/source/config",
69 "//third_party/libvpx/source/libvpx", 71 "//third_party/libvpx/source/libvpx",
70 target_gen_dir 72 target_gen_dir
71 ] 73 ]
72 } 74 }
Tom Finegan 2015/08/05 22:57:32 The existing stuff seems to always add a blank lin
Johann 2015/08/05 23:02:29 I left these together specifically because they're
75 yasm_assemble("vp8_libvpx_yasm") {
76 if (current_cpu == "x86") {
77 sources = vp8_libvpx_srcs_x86_assembly
78 } else if (current_cpu == "x64") {
79 sources = vp8_libvpx_srcs_x86_64_assembly
80 }
81
82 defines = [ "CHROMIUM" ]
Tom Finegan 2015/08/05 22:57:32 This being repeated in all targets seems weird, bu
Johann 2015/08/05 23:02:29 I have no idea which defines etc are required, so
83 include_dirs = [
84 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full",
85 "//third_party/libvpx/source/config",
86 "//third_party/libvpx/source/libvpx",
87 target_gen_dir
88 ]
89 }
90 yasm_assemble("vp9_libvpx_yasm") {
91 if (current_cpu == "x86") {
92 sources = vp9_libvpx_srcs_x86_assembly
93 } else if (current_cpu == "x64") {
94 sources = vp9_libvpx_srcs_x86_64_assembly
95 }
96
97 defines = [ "CHROMIUM" ]
98 include_dirs = [
99 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full",
100 "//third_party/libvpx/source/config",
101 "//third_party/libvpx/source/libvpx",
102 target_gen_dir
103 ]
104 }
105 yasm_assemble("vpx_dsp_libvpx_yasm") {
106 if (current_cpu == "x86") {
107 sources = vpx_dsp_libvpx_srcs_x86_assembly
108 } else if (current_cpu == "x64") {
109 sources = vpx_dsp_libvpx_srcs_x86_64_assembly
110 }
111
112 defines = [ "CHROMIUM" ]
113 include_dirs = [
114 "//third_party/libvpx/source/config/$os_category/$cpu_arch_full",
115 "//third_party/libvpx/source/config",
116 "//third_party/libvpx/source/libvpx",
117 target_gen_dir
118 ]
119 }
73 } 120 }
74 121
75 static_library("libvpx_intrinsics_mmx") { 122 static_library("vp8_libvpx_intrinsics_mmx") {
76 configs += [ ":libvpx_config" ] 123 configs += [ ":libvpx_config" ]
77 configs -= [ "//build/config/compiler:chromium_code" ] 124 configs -= [ "//build/config/compiler:chromium_code" ]
78 configs += [ "//build/config/compiler:no_chromium_code" ] 125 configs += [ "//build/config/compiler:no_chromium_code" ]
79 if (!is_win) { 126 if (!is_win) {
80 cflags = [ "-mmmx" ] 127 cflags = [ "-mmmx" ]
81 } 128 }
82 if (current_cpu == "x86") { 129 if (current_cpu == "x86") {
83 sources = libvpx_srcs_x86_mmx 130 sources = vp8_libvpx_srcs_x86_mmx
84 } else if (current_cpu == "x64") { 131 } else if (current_cpu == "x64") {
85 sources = libvpx_srcs_x86_64_mmx 132 sources = vp8_libvpx_srcs_x86_64_mmx
133 }
134 }
135 static_library("vp9_libvpx_intrinsics_mmx") {
136 configs += [ ":libvpx_config" ]
137 configs -= [ "//build/config/compiler:chromium_code" ]
138 configs += [ "//build/config/compiler:no_chromium_code" ]
139 if (!is_win) {
140 cflags = [ "-mmmx" ]
141 }
142 if (current_cpu == "x86") {
143 sources = vp9_libvpx_srcs_x86_mmx
144 } else if (current_cpu == "x64") {
145 sources = vp9_libvpx_srcs_x86_64_mmx
146 }
147 }
148 static_library("vpx_dsp_libvpx_intrinsics_mmx") {
149 configs += [ ":libvpx_config" ]
150 configs -= [ "//build/config/compiler:chromium_code" ]
151 configs += [ "//build/config/compiler:no_chromium_code" ]
152 if (!is_win) {
153 cflags = [ "-mmmx" ]
154 }
155 if (current_cpu == "x86") {
156 sources = vpx_dsp_libvpx_srcs_x86_mmx
157 } else if (current_cpu == "x64") {
158 sources = vpx_dsp_libvpx_srcs_x86_64_mmx
86 } 159 }
87 } 160 }
88 161
89 static_library("libvpx_intrinsics_sse2") { 162 static_library("vp8_libvpx_intrinsics_sse2") {
90 configs += [ ":libvpx_config" ] 163 configs += [ ":libvpx_config" ]
91 configs -= [ "//build/config/compiler:chromium_code" ] 164 configs -= [ "//build/config/compiler:chromium_code" ]
92 configs += [ "//build/config/compiler:no_chromium_code" ] 165 configs += [ "//build/config/compiler:no_chromium_code" ]
166 if (!is_win || is_clang) {
167 cflags = [ "-msse2" ]
168 }
169 if (current_cpu == "x86") {
170 sources = vp8_libvpx_srcs_x86_sse2
171 } else if (current_cpu == "x64") {
172 sources = vp8_libvpx_srcs_x86_64_sse2
173 }
174 }
175 static_library("vp9_libvpx_intrinsics_sse2") {
176 configs += [ ":libvpx_config" ]
177 configs -= [ "//build/config/compiler:chromium_code" ]
178 configs += [ "//build/config/compiler:no_chromium_code" ]
93 if (!is_win || is_clang) { 179 if (!is_win || is_clang) {
94 cflags = [ "-msse2" ] 180 cflags = [ "-msse2" ]
95 } 181 }
96 if (current_cpu == "x86") { 182 if (current_cpu == "x86") {
97 sources = libvpx_srcs_x86_sse2 183 sources = vp9_libvpx_srcs_x86_sse2
98 } else if (current_cpu == "x64") { 184 } else if (current_cpu == "x64") {
99 sources = libvpx_srcs_x86_64_sse2 185 sources = vp9_libvpx_srcs_x86_64_sse2
186 }
187 }
188 static_library("vpx_dsp_libvpx_intrinsics_sse2") {
189 configs += [ ":libvpx_config" ]
190 configs -= [ "//build/config/compiler:chromium_code" ]
191 configs += [ "//build/config/compiler:no_chromium_code" ]
192 if (!is_win || is_clang) {
193 cflags = [ "-msse2" ]
194 }
195 if (current_cpu == "x86") {
196 sources = vpx_dsp_libvpx_srcs_x86_sse2
197 } else if (current_cpu == "x64") {
198 sources = vpx_dsp_libvpx_srcs_x86_64_sse2
100 } 199 }
101 } 200 }
102 201
103 static_library("libvpx_intrinsics_ssse3") { 202 static_library("vp8_libvpx_intrinsics_ssse3") {
104 configs += [ ":libvpx_config" ] 203 configs += [ ":libvpx_config" ]
105 configs -= [ "//build/config/compiler:chromium_code" ] 204 configs -= [ "//build/config/compiler:chromium_code" ]
106 configs += [ "//build/config/compiler:no_chromium_code" ] 205 configs += [ "//build/config/compiler:no_chromium_code" ]
206 if (!is_win || is_clang) {
207 cflags = [ "-mssse3" ]
208 }
209 if (current_cpu == "x86") {
210 sources = vp8_libvpx_srcs_x86_ssse3
211 } else if (current_cpu == "x64") {
212 sources = vp8_libvpx_srcs_x86_64_ssse3
213 }
214 }
215 static_library("vp9_libvpx_intrinsics_ssse3") {
216 configs += [ ":libvpx_config" ]
217 configs -= [ "//build/config/compiler:chromium_code" ]
218 configs += [ "//build/config/compiler:no_chromium_code" ]
219 if (!is_win || is_clang) {
220 cflags = [ "-mssse3" ]
221 }
222 if (current_cpu == "x86") {
223 sources = vp9_libvpx_srcs_x86_ssse3
224 } else if (current_cpu == "x64") {
225 sources = vp9_libvpx_srcs_x86_64_ssse3
226 }
227 }
228 static_library("vpx_dsp_libvpx_intrinsics_ssse3") {
229 configs += [ ":libvpx_config" ]
230 configs -= [ "//build/config/compiler:chromium_code" ]
231 configs += [ "//build/config/compiler:no_chromium_code" ]
107 if (!is_win || is_clang) { 232 if (!is_win || is_clang) {
108 cflags = [ "-mssse3" ] 233 cflags = [ "-mssse3" ]
109 } 234 }
110 if (current_cpu == "x86") { 235 if (current_cpu == "x86") {
111 sources = libvpx_srcs_x86_ssse3 236 sources = vpx_dsp_libvpx_srcs_x86_ssse3
112 } else if (current_cpu == "x64") { 237 } else if (current_cpu == "x64") {
113 sources = libvpx_srcs_x86_64_ssse3 238 sources = vpx_dsp_libvpx_srcs_x86_64_ssse3
114 } 239 }
115 } 240 }
116 241
117 static_library("libvpx_intrinsics_sse4_1") { 242 static_library("vp8_libvpx_intrinsics_sse4_1") {
118 configs += [ ":libvpx_config" ] 243 configs += [ ":libvpx_config" ]
119 configs -= [ "//build/config/compiler:chromium_code" ] 244 configs -= [ "//build/config/compiler:chromium_code" ]
120 configs += [ "//build/config/compiler:no_chromium_code" ] 245 configs += [ "//build/config/compiler:no_chromium_code" ]
246 if (!is_win || is_clang) {
247 cflags = [ "-msse4.1" ]
248 }
249 if (current_cpu == "x86") {
250 sources = vp8_libvpx_srcs_x86_sse4_1
251 } else if (current_cpu == "x64") {
252 sources = vp8_libvpx_srcs_x86_64_sse4_1
253 }
254 }
255 static_library("vp9_libvpx_intrinsics_sse4_1") {
256 configs += [ ":libvpx_config" ]
257 configs -= [ "//build/config/compiler:chromium_code" ]
258 configs += [ "//build/config/compiler:no_chromium_code" ]
259 if (!is_win || is_clang) {
260 cflags = [ "-msse4.1" ]
261 }
262 if (current_cpu == "x86") {
263 sources = vp9_libvpx_srcs_x86_sse4_1
264 } else if (current_cpu == "x64") {
265 sources = vp9_libvpx_srcs_x86_64_sse4_1
266 }
267 }
268 static_library("vpx_dsp_libvpx_intrinsics_sse4_1") {
269 configs += [ ":libvpx_config" ]
270 configs -= [ "//build/config/compiler:chromium_code" ]
271 configs += [ "//build/config/compiler:no_chromium_code" ]
121 if (!is_win || is_clang) { 272 if (!is_win || is_clang) {
122 cflags = [ "-msse4.1" ] 273 cflags = [ "-msse4.1" ]
123 } 274 }
124 if (current_cpu == "x86") { 275 if (current_cpu == "x86") {
125 sources = libvpx_srcs_x86_sse4_1 276 sources = vpx_dsp_libvpx_srcs_x86_sse4_1
126 } else if (current_cpu == "x64") { 277 } else if (current_cpu == "x64") {
127 sources = libvpx_srcs_x86_64_sse4_1 278 sources = vpx_dsp_libvpx_srcs_x86_64_sse4_1
128 } 279 }
129 } 280 }
130 281
131 static_library("libvpx_intrinsics_avx2") { 282 static_library("vp8_libvpx_intrinsics_avx2") {
132 configs += [ ":libvpx_config" ] 283 configs += [ ":libvpx_config" ]
133 configs -= [ "//build/config/compiler:chromium_code" ] 284 configs -= [ "//build/config/compiler:chromium_code" ]
134 configs += [ "//build/config/compiler:no_chromium_code" ] 285 configs += [ "//build/config/compiler:no_chromium_code" ]
135 if (is_win) { 286 if (is_win) {
136 cflags = [ "/arch:AVX2" ] 287 cflags = [ "/arch:AVX2" ]
137 } else { 288 } else {
138 cflags = [ "-mavx2" ] 289 cflags = [ "-mavx2" ]
139 } 290 }
140 if (current_cpu == "x86") { 291 if (current_cpu == "x86") {
141 sources = libvpx_srcs_x86_avx2 292 sources = vp8_libvpx_srcs_x86_avx2
142 } else if (current_cpu == "x64") { 293 } else if (current_cpu == "x64") {
143 sources = libvpx_srcs_x86_64_avx2 294 sources = vp8_libvpx_srcs_x86_64_avx2
295 }
296 }
297 static_library("vp9_libvpx_intrinsics_avx2") {
298 configs += [ ":libvpx_config" ]
299 configs -= [ "//build/config/compiler:chromium_code" ]
300 configs += [ "//build/config/compiler:no_chromium_code" ]
301 if (is_win) {
302 cflags = [ "/arch:AVX2" ]
303 } else {
304 cflags = [ "-mavx2" ]
305 }
306 if (current_cpu == "x86") {
307 sources = vp9_libvpx_srcs_x86_avx2
308 } else if (current_cpu == "x64") {
309 sources = vp9_libvpx_srcs_x86_64_avx2
310 }
311 }
312 static_library("vpx_dsp_libvpx_intrinsics_avx2") {
313 configs += [ ":libvpx_config" ]
314 configs -= [ "//build/config/compiler:chromium_code" ]
315 configs += [ "//build/config/compiler:no_chromium_code" ]
316 if (is_win) {
317 cflags = [ "/arch:AVX2" ]
318 } else {
319 cflags = [ "-mavx2" ]
320 }
321 if (current_cpu == "x86") {
322 sources = vpx_dsp_libvpx_srcs_x86_avx2
323 } else if (current_cpu == "x64") {
324 sources = vpx_dsp_libvpx_srcs_x86_64_avx2
144 } 325 }
145 } 326 }
146 327
147 if (cpu_arch_full == "arm-neon-cpu-detect") { 328 if (cpu_arch_full == "arm-neon-cpu-detect") {
148 static_library("libvpx_intrinsics_neon") { 329 static_library("vp8_libvpx_intrinsics_neon") {
149 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 330 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
150 configs += [ ":libvpx_config" ] 331 configs += [ ":libvpx_config" ]
151 cflags = [ "-mfpu=neon" ] 332 cflags = [ "-mfpu=neon" ]
152 sources = libvpx_srcs_arm_neon_cpu_detect_neon 333 sources = vp8_libvpx_srcs_arm_neon_cpu_detect_neon
334 }
335 }
336 if (cpu_arch_full == "arm-neon-cpu-detect") {
337 static_library("vp9_libvpx_intrinsics_neon") {
338 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
339 configs += [ ":libvpx_config" ]
340 cflags = [ "-mfpu=neon" ]
341 sources = vp9_libvpx_srcs_arm_neon_cpu_detect_neon
342 }
343 }
344 if (cpu_arch_full == "arm-neon-cpu-detect") {
345 static_library("vpx_dsp_libvpx_intrinsics_neon") {
346 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
347 configs += [ ":libvpx_config" ]
348 cflags = [ "-mfpu=neon" ]
349 sources = vpx_dsp_libvpx_srcs_arm_neon_cpu_detect_neon
153 } 350 }
154 } 351 }
155 352
156 # Converts ARM assembly files to GAS style. 353 # Converts ARM assembly files to GAS style.
354 # Not broken apart by vp8/vp9/vpx_dsp because we don't anticipate adding any
355 # new files of this kind.
157 if (current_cpu == "arm") { 356 if (current_cpu == "arm") {
158 action_foreach("convert_arm_assembly") { 357 action_foreach("convert_arm_assembly") {
159 script = "//third_party/libvpx/run_perl.py" 358 script = "//third_party/libvpx/run_perl.py"
160 if (cpu_arch_full == "arm-neon") { 359 if (cpu_arch_full == "arm-neon") {
161 sources = libvpx_srcs_arm_neon_assembly 360 sources = vp8_libvpx_srcs_arm_neon_assembly
361 sources += vp9_libvpx_srcs_arm_neon_assembly
362 sources += vpx_dsp_libvpx_srcs_arm_neon_assembly
162 } else if (cpu_arch_full == "arm-neon-cpu-detect") { 363 } else if (cpu_arch_full == "arm-neon-cpu-detect") {
163 sources = libvpx_srcs_arm_neon_cpu_detect_assembly 364 sources = vp8_libvpx_srcs_arm_neon_cpu_detect_assembly
365 sources += vp9_libvpx_srcs_arm_neon_cpu_detect_assembly
366 sources += vpx_dsp_libvpx_srcs_arm_neon_cpu_detect_assembly
164 } else { 367 } else {
165 sources = libvpx_srcs_arm_assembly 368 sources = vp8_libvpx_srcs_arm_assembly
369 sources += vp9_libvpx_srcs_arm_assembly
370 sources += vpx_dsp_libvpx_srcs_arm_assembly
166 } 371 }
167 outputs = [ "$target_gen_dir/{{source_name_part}}.S" ] 372 outputs = [ "$target_gen_dir/{{source_name_part}}.S" ]
168 args = [ 373 args = [
169 "-s", 374 "-s",
170 rebase_path("//third_party/libvpx/source/libvpx/build/make/ads2gas.pl", 375 rebase_path("//third_party/libvpx/source/libvpx/build/make/ads2gas.pl",
171 root_build_dir), 376 root_build_dir),
172 "-i", "{{source}}", 377 "-i", "{{source}}",
173 "-o", rebase_path("$target_gen_dir/{{source_name_part}}.S") 378 "-o", rebase_path("$target_gen_dir/{{source_name_part}}.S")
174 ] 379 ]
175 } 380 }
(...skipping 14 matching lines...) Expand all
190 395
191 # gn orders flags on a target before flags from configs. The default config 396 # gn orders flags on a target before flags from configs. The default config
192 # adds -Wall, and these flags have to be after -Wall -- so they need to come 397 # adds -Wall, and these flags have to be after -Wall -- so they need to come
193 # from a config and can't be on the target directly. 398 # from a config and can't be on the target directly.
194 config("libvpx_warnings") { 399 config("libvpx_warnings") {
195 if (is_clang) { 400 if (is_clang) {
196 cflags = [ "-Wno-conversion" ] 401 cflags = [ "-Wno-conversion" ]
197 } 402 }
198 } 403 }
199 404
405 static_library("vp8") {
406 if (!is_debug && is_win && is_official_build) {
407 configs -= [ "//build/config/compiler:optimize" ]
408 configs += [ "//build/config/compiler:optimize_max" ]
409 }
410
411 if (current_cpu == "x86") {
412 sources = vp8_libvpx_srcs_x86
413 } else if (current_cpu == "x64") {
414 if (is_msan) {
415 sources = vp8_libvpx_srcs_generic
416 } else {
417 sources = vp8_libvpx_srcs_x86_64
418 }
419 } else if (current_cpu == "mipsel") {
420 sources = vp8_libvpx_srcs_mips
421 } else if (current_cpu == "arm") {
422 if (arm_use_neon) {
423 sources = vp8_libvpx_srcs_arm_neon
424 } else if (is_android) {
425 sources = vp8_libvpx_srcs_arm_neon_cpu_detect
426 } else {
427 sources = vp8_libvpx_srcs_arm
428 }
429 } else if (current_cpu == "arm64") {
430 sources = vp8_libvpx_srcs_arm64
431 }
432
433 configs += [ ":libvpx_config" ]
434 configs -= [ "//build/config/compiler:chromium_code" ]
435 configs += [ "//build/config/compiler:no_chromium_code" ]
436 configs += [ ":libvpx_warnings" ]
437 public_configs = [ ":libvpx_external_config" ]
438 }
439 static_library("vp9") {
440 if (!is_debug && is_win && is_official_build) {
441 configs -= [ "//build/config/compiler:optimize" ]
442 configs += [ "//build/config/compiler:optimize_max" ]
443 }
444
445 if (current_cpu == "x86") {
446 sources = vp9_libvpx_srcs_x86
447 } else if (current_cpu == "x64") {
448 if (is_msan) {
449 sources = vp9_libvpx_srcs_generic
450 } else {
451 sources = vp9_libvpx_srcs_x86_64
452 }
453 } else if (current_cpu == "mipsel") {
454 sources = vp9_libvpx_srcs_mips
455 } else if (current_cpu == "arm") {
456 if (arm_use_neon) {
457 sources = vp9_libvpx_srcs_arm_neon
458 } else if (is_android) {
459 sources = vp9_libvpx_srcs_arm_neon_cpu_detect
460 } else {
461 sources = vp9_libvpx_srcs_arm
462 }
463 } else if (current_cpu == "arm64") {
464 sources = vp9_libvpx_srcs_arm64
465 }
466
467 configs += [ ":libvpx_config" ]
468 configs -= [ "//build/config/compiler:chromium_code" ]
469 configs += [ "//build/config/compiler:no_chromium_code" ]
470 configs += [ ":libvpx_warnings" ]
471 public_configs = [ ":libvpx_external_config" ]
472 }
473 static_library("vpx_dsp") {
474 if (!is_debug && is_win && is_official_build) {
475 configs -= [ "//build/config/compiler:optimize" ]
476 configs += [ "//build/config/compiler:optimize_max" ]
477 }
478
479 if (current_cpu == "x86") {
480 sources = vpx_dsp_libvpx_srcs_x86
481 } else if (current_cpu == "x64") {
482 if (is_msan) {
483 sources = vpx_dsp_libvpx_srcs_generic
484 } else {
485 sources = vpx_dsp_libvpx_srcs_x86_64
486 }
487 } else if (current_cpu == "mipsel") {
488 sources = vpx_dsp_libvpx_srcs_mips
489 } else if (current_cpu == "arm") {
490 if (arm_use_neon) {
491 sources = vpx_dsp_libvpx_srcs_arm_neon
492 } else if (is_android) {
493 sources = vpx_dsp_libvpx_srcs_arm_neon_cpu_detect
494 } else {
495 sources = vpx_dsp_libvpx_srcs_arm
496 }
497 } else if (current_cpu == "arm64") {
498 sources = vpx_dsp_libvpx_srcs_arm64
499 }
500
501 configs += [ ":libvpx_config" ]
502 configs -= [ "//build/config/compiler:chromium_code" ]
503 configs += [ "//build/config/compiler:no_chromium_code" ]
504 configs += [ ":libvpx_warnings" ]
505 public_configs = [ ":libvpx_external_config" ]
506 }
507
200 static_library("libvpx") { 508 static_library("libvpx") {
201 if (!is_debug && is_win && is_official_build) { 509 if (!is_debug && is_win && is_official_build) {
202 configs -= [ "//build/config/compiler:optimize" ] 510 configs -= [ "//build/config/compiler:optimize" ]
203 configs += [ "//build/config/compiler:optimize_max" ] 511 configs += [ "//build/config/compiler:optimize_max" ]
204 } 512 }
205 513
206 if (current_cpu == "x86") { 514 if (current_cpu == "x86") {
207 sources = libvpx_srcs_x86 515 sources = libvpx_srcs_x86
208 } else if (current_cpu == "x64") { 516 } else if (current_cpu == "x64") {
209 if (is_msan) { 517 if (is_msan) {
(...skipping 15 matching lines...) Expand all
225 sources = libvpx_srcs_arm64 533 sources = libvpx_srcs_arm64
226 } 534 }
227 535
228 configs += [ ":libvpx_config" ] 536 configs += [ ":libvpx_config" ]
229 configs -= [ "//build/config/compiler:chromium_code" ] 537 configs -= [ "//build/config/compiler:chromium_code" ]
230 configs += [ "//build/config/compiler:no_chromium_code" ] 538 configs += [ "//build/config/compiler:no_chromium_code" ]
231 configs += [ ":libvpx_warnings" ] 539 configs += [ ":libvpx_warnings" ]
232 deps = [] 540 deps = []
233 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { 541 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) {
234 deps += [ 542 deps += [
543 ":vp8",
544 ":vp9",
545 ":vpx_dsp",
235 ":libvpx_yasm", 546 ":libvpx_yasm",
236 ":libvpx_intrinsics_mmx", 547 ":vp8_libvpx_yasm",
237 ":libvpx_intrinsics_sse2", 548 ":vp9_libvpx_yasm",
238 ":libvpx_intrinsics_ssse3", 549 ":vpx_dsp_libvpx_yasm",
239 ":libvpx_intrinsics_sse4_1", 550 ":vp8_libvpx_intrinsics_mmx",
240 ":libvpx_intrinsics_avx2", 551 ":vp9_libvpx_intrinsics_mmx",
552 ":vpx_dsp_libvpx_intrinsics_mmx",
553 ":vp8_libvpx_intrinsics_sse2",
554 ":vp9_libvpx_intrinsics_sse2",
555 ":vpx_dsp_libvpx_intrinsics_sse2",
556 ":vp8_libvpx_intrinsics_ssse3",
557 ":vp9_libvpx_intrinsics_ssse3",
558 ":vpx_dsp_libvpx_intrinsics_ssse3",
559 ":vp8_libvpx_intrinsics_sse4_1",
560 ":vp9_libvpx_intrinsics_sse4_1",
561 ":vpx_dsp_libvpx_intrinsics_sse4_1",
562 ":vp8_libvpx_intrinsics_avx2",
563 ":vp9_libvpx_intrinsics_avx2",
564 ":vpx_dsp_libvpx_intrinsics_avx2",
241 ] 565 ]
242 } 566 }
243 if (cpu_arch_full == "arm-neon-cpu-detect") { 567 if (cpu_arch_full == "arm-neon-cpu-detect") {
244 deps += [ ":libvpx_intrinsics_neon" ] 568 deps += [
569 ":vp8_libvpx_intrinsics_neon",
570 ":vp9_libvpx_intrinsics_neon",
571 ":vpx_dsp_libvpx_intrinsics_neon",
572 ]
245 } 573 }
246 if (is_android) { 574 if (is_android) {
247 deps += [ "//third_party/android_tools:cpu_features" ] 575 deps += [ "//third_party/android_tools:cpu_features" ]
248 } 576 }
249 if (current_cpu == "arm") { 577 if (current_cpu == "arm") {
250 deps += [ ":libvpx_assembly_arm" ] 578 deps += [
579 ":vp8_libvpx_assembly_arm",
580 ":vp9_libvpx_assembly_arm",
581 ":vpx_dsp_libvpx_assembly_arm",
582 ]
251 } 583 }
252 584
253 public_configs = [ ":libvpx_external_config" ] 585 public_configs = [ ":libvpx_external_config" ]
254 } 586 }
OLDNEW
« no previous file with comments | « no previous file | generate_gypi.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698