OLD | NEW |
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/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 if (!is_win || is_clang) { | 167 if (!is_win || is_clang) { |
168 cflags = [ "-msse4.1" ] | 168 cflags = [ "-msse4.1" ] |
169 } | 169 } |
170 if (current_cpu == "x86") { | 170 if (current_cpu == "x86") { |
171 sources = libvpx_srcs_x86_sse4_1 | 171 sources = libvpx_srcs_x86_sse4_1 |
172 } else if (current_cpu == "x64") { | 172 } else if (current_cpu == "x64") { |
173 sources = libvpx_srcs_x86_64_sse4_1 | 173 sources = libvpx_srcs_x86_64_sse4_1 |
174 } | 174 } |
175 } | 175 } |
176 | 176 |
177 static_library("libvpx_intrinsics_avx") { | 177 # Currently no avx intrinsic functions |
178 configs += [ ":libvpx_config" ] | 178 # static_library("libvpx_intrinsics_avx") { |
179 configs -= [ "//build/config/compiler:chromium_code" ] | 179 # configs += [ ":libvpx_config" ] |
180 configs += [ "//build/config/compiler:no_chromium_code" ] | 180 # configs -= [ "//build/config/compiler:chromium_code" ] |
181 configs += [ ":libvpx_warnings" ] | 181 # configs += [ "//build/config/compiler:no_chromium_code" ] |
182 if (is_win) { | 182 # configs += [ ":libvpx_warnings" ] |
183 cflags = [ "/arch:AVX" ] | 183 # if (is_win) { |
184 } else { | 184 # cflags = [ "/arch:AVX" ] |
185 cflags = [ "-mavx" ] | 185 # } else { |
186 } | 186 # cflags = [ "-mavx" ] |
187 if (current_cpu == "x86") { | 187 # } |
188 sources = libvpx_srcs_x86_avx | 188 # if (current_cpu == "x86") { |
189 } else if (current_cpu == "x64") { | 189 # sources = libvpx_srcs_x86_avx |
190 sources = libvpx_srcs_x86_64_avx | 190 # } else if (current_cpu == "x64") { |
191 } | 191 # sources = libvpx_srcs_x86_64_avx |
192 } | 192 # } |
| 193 # } |
193 | 194 |
194 static_library("libvpx_intrinsics_avx2") { | 195 static_library("libvpx_intrinsics_avx2") { |
195 configs += [ ":libvpx_config" ] | 196 configs += [ ":libvpx_config" ] |
196 configs -= [ "//build/config/compiler:chromium_code" ] | 197 configs -= [ "//build/config/compiler:chromium_code" ] |
197 configs += [ "//build/config/compiler:no_chromium_code" ] | 198 configs += [ "//build/config/compiler:no_chromium_code" ] |
198 configs += [ ":libvpx_warnings" ] | 199 configs += [ ":libvpx_warnings" ] |
199 if (is_win) { | 200 if (is_win) { |
200 cflags = [ "/arch:AVX2" ] | 201 cflags = [ "/arch:AVX2" ] |
201 } else { | 202 } else { |
202 cflags = [ "-mavx2" ] | 203 cflags = [ "-mavx2" ] |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 sources = libvpx_srcs_arm64 | 289 sources = libvpx_srcs_arm64 |
289 } | 290 } |
290 | 291 |
291 configs += [ ":libvpx_config" ] | 292 configs += [ ":libvpx_config" ] |
292 configs -= [ "//build/config/compiler:chromium_code" ] | 293 configs -= [ "//build/config/compiler:chromium_code" ] |
293 configs += [ "//build/config/compiler:no_chromium_code" ] | 294 configs += [ "//build/config/compiler:no_chromium_code" ] |
294 configs += [ ":libvpx_warnings" ] | 295 configs += [ ":libvpx_warnings" ] |
295 deps = [] | 296 deps = [] |
296 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { | 297 if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) { |
297 deps += [ | 298 deps += [ |
298 ":libvpx_intrinsics_avx", | 299 # Currently no avx intrinsic functions |
| 300 #":libvpx_intrinsics_avx", |
299 ":libvpx_intrinsics_avx2", | 301 ":libvpx_intrinsics_avx2", |
300 ":libvpx_intrinsics_mmx", | 302 ":libvpx_intrinsics_mmx", |
301 ":libvpx_intrinsics_sse2", | 303 ":libvpx_intrinsics_sse2", |
302 ":libvpx_intrinsics_sse4_1", | 304 ":libvpx_intrinsics_sse4_1", |
303 ":libvpx_intrinsics_ssse3", | 305 ":libvpx_intrinsics_ssse3", |
304 ":libvpx_yasm", | 306 ":libvpx_yasm", |
305 ] | 307 ] |
306 } | 308 } |
307 if (cpu_arch_full == "arm-neon-cpu-detect") { | 309 if (cpu_arch_full == "arm-neon-cpu-detect") { |
308 deps += [ ":libvpx_intrinsics_neon" ] | 310 deps += [ ":libvpx_intrinsics_neon" ] |
309 } | 311 } |
310 if (is_android) { | 312 if (is_android) { |
311 deps += [ "//third_party/android_tools:cpu_features" ] | 313 deps += [ "//third_party/android_tools:cpu_features" ] |
312 } | 314 } |
313 if (current_cpu == "arm") { | 315 if (current_cpu == "arm") { |
314 deps += [ ":libvpx_assembly_arm" ] | 316 deps += [ ":libvpx_assembly_arm" ] |
315 } | 317 } |
316 | 318 |
317 public_configs = [ ":libvpx_external_config" ] | 319 public_configs = [ ":libvpx_external_config" ] |
318 } | 320 } |
OLD | NEW |