0048-third_party-libvpx-enable-riscv64-build-as-generic.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 7248d3dc4519b2cf201b0f97d8802eafad062b0b Mon Sep 17 00:00:00 2001
  2. From: Tien Hock Loh <tienhock.loh@starfivetech.com>
  3. Date: Wed, 10 Aug 2022 06:01:53 -0400
  4. Subject: [PATCH 48/68] third_party: libvpx: enable riscv64 build as generic
  5. Added libvpx as dependency to nwjs and add libvpx
  6. riscv64 build support.
  7. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  8. Signed-off-by: Tien Hock Loh <tienhock.loh@starfivetech.com>
  9. ---
  10. chrome/BUILD.gn | 1 +
  11. third_party/libvpx/BUILD.gn | 5 +++++
  12. 2 files changed, 6 insertions(+)
  13. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
  14. index 183e3b9b28c8..161410d3ef20 100644
  15. --- a/chrome/BUILD.gn
  16. +++ b/chrome/BUILD.gn
  17. @@ -1466,6 +1466,7 @@ group("dependencies") {
  18. "//services/tracing/public/cpp",
  19. "//third_party/blink/public:blink_devtools_frontend_resources",
  20. "//third_party/blink/public:blink_devtools_inspector_resources",
  21. + "//third_party/libvpx",
  22. "//v8:v8_headers",
  23. ]
  24. diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn
  25. index 758aca154073..ee4de99375ac 100644
  26. --- a/third_party/libvpx/BUILD.gn
  27. +++ b/third_party/libvpx/BUILD.gn
  28. @@ -35,6 +35,8 @@ if (current_cpu == "x86") {
  29. } else {
  30. cpu_arch_full = current_cpu
  31. }
  32. +} else if (current_cpu == "riscv64") {
  33. + cpu_arch_full = "generic"
  34. } else {
  35. cpu_arch_full = current_cpu
  36. }
  37. @@ -399,6 +401,9 @@ static_library("libvpx") {
  38. sources = libvpx_srcs_arm64
  39. public_deps = [ ":libvpx_arm64_headers" ]
  40. }
  41. + } else if (current_cpu == "riscv64") {
  42. + sources = libvpx_srcs_generic
  43. + public_deps = [ ":libvpx_generic_headers" ]
  44. }
  45. configs -= [ "//build/config/compiler:chromium_code" ]
  46. --
  47. 2.30.2