aboutsummaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorPrashanth Swaminathan <prashanthsw@google.com>2023-05-03 16:01:20 -0700
committerlibyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-09 15:31:51 +0000
commit8b4aa7cef9538729e1945778b65c46e6ae42f711 (patch)
treeb4cce8655eecb3b6bfaf368ff6c317c22ebae21c /BUILD.gn
parentf18f1c784a1847a4e30a1b9d38efad0518f5f41b (diff)
downloadlibyuv-8b4aa7cef9538729e1945778b65c46e6ae42f711.tar.gz
Add RVV files to Android and GN builds
Include row_rvv.cc source file and support for riscv64 builds in Android and GN builds. Adds GN build flag to disable RISC-V vector operations. Switches dynamic linker to 64-bit by default, with exceptions for 32-bit targets as defined in //build/config/android/abi.gni. Bug: b/280364043 Test: Verified local build via Android and GN. Change-Id: I1bbd36f16aafa16d4bfd117de03354be79743a9d Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4501727 Reviewed-by: Mirko Bonadei <mbonadei@chromium.org> Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com> Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn19
1 files changed, 12 insertions, 7 deletions
diff --git a/BUILD.gn b/BUILD.gn
index f92a5529..adaae9d8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -22,15 +22,19 @@ declare_args() {
config("libyuv_config") {
include_dirs = [ "include" ]
- if (is_android && current_cpu == "arm64") {
- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
- }
- if (is_android && current_cpu != "arm64") {
- ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
+ if (is_android) {
+ if (target_cpu == "arm" || target_cpu == "x86" || target_cpu == "mipsel") {
+ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
+ } else {
+ ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
+ }
}
-
+ defines = []
if (!libyuv_use_neon) {
- defines = [ "LIBYUV_DISABLE_NEON" ]
+ defines += [ "LIBYUV_DISABLE_NEON" ]
+ }
+ if (libyuv_disable_rvv) {
+ defines += [ "LIBYUV_DISABLE_RVV" ]
}
}
@@ -130,6 +134,7 @@ static_library("libyuv_internal") {
"source/row_any.cc",
"source/row_common.cc",
"source/row_gcc.cc",
+ "source/row_rvv.cc",
"source/row_win.cc",
"source/scale.cc",
"source/scale_any.cc",