libyuv.gni 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright 2016 The LibYuv Project Authors. All rights reserved.
  2. #
  3. # Use of this source code is governed by a BSD-style license
  4. # that can be found in the LICENSE file in the root of the source
  5. # tree. An additional intellectual property rights grant can be found
  6. # in the file PATENTS. All contributing project authors may
  7. # be found in the AUTHORS file in the root of the source tree.
  8. import("//build/config/arm.gni")
  9. import("//build/config/loongarch64.gni")
  10. import("//build/config/mips.gni")
  11. import("//build_overrides/build.gni")
  12. declare_args() {
  13. libyuv_include_tests = !build_with_chromium
  14. libyuv_disable_jpeg = false
  15. libyuv_disable_rvv = false
  16. libyuv_use_neon =
  17. current_cpu == "arm64" ||
  18. (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
  19. libyuv_use_sve = current_cpu == "arm64"
  20. # Restrict to is_linux to work around undefined symbol linker errors on
  21. # Android, Fuchsia, macOS, and compilation errors on Windows.
  22. # TODO: bug 359006069 - Remove the is_linux restriction after the linker and
  23. # compilation errors are fixed.
  24. libyuv_use_sme = current_cpu == "arm64" && is_linux
  25. libyuv_use_msa =
  26. (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa
  27. libyuv_use_mmi =
  28. (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_mmi
  29. libyuv_use_lsx = current_cpu == "loong64" && loongarch64_use_lsx
  30. libyuv_use_lasx = current_cpu == "loong64" && loongarch64_use_lasx
  31. }