mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
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>
This commit is contained in:
parent
f18f1c784a
commit
8b4aa7cef9
@ -62,6 +62,7 @@ cc_library {
|
|||||||
"source/row_msa.cc",
|
"source/row_msa.cc",
|
||||||
"source/row_neon.cc",
|
"source/row_neon.cc",
|
||||||
"source/row_neon64.cc",
|
"source/row_neon64.cc",
|
||||||
|
"source/row_rvv.cc",
|
||||||
"source/scale.cc",
|
"source/scale.cc",
|
||||||
"source/scale_any.cc",
|
"source/scale_any.cc",
|
||||||
"source/scale_argb.cc",
|
"source/scale_argb.cc",
|
||||||
|
|||||||
15
BUILD.gn
15
BUILD.gn
@ -22,15 +22,19 @@ declare_args() {
|
|||||||
|
|
||||||
config("libyuv_config") {
|
config("libyuv_config") {
|
||||||
include_dirs = [ "include" ]
|
include_dirs = [ "include" ]
|
||||||
if (is_android && current_cpu == "arm64") {
|
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" ]
|
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
|
||||||
}
|
}
|
||||||
if (is_android && current_cpu != "arm64") {
|
|
||||||
ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
|
|
||||||
}
|
}
|
||||||
|
defines = []
|
||||||
if (!libyuv_use_neon) {
|
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_any.cc",
|
||||||
"source/row_common.cc",
|
"source/row_common.cc",
|
||||||
"source/row_gcc.cc",
|
"source/row_gcc.cc",
|
||||||
|
"source/row_rvv.cc",
|
||||||
"source/row_win.cc",
|
"source/row_win.cc",
|
||||||
"source/scale.cc",
|
"source/scale.cc",
|
||||||
"source/scale_any.cc",
|
"source/scale_any.cc",
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import("//build_overrides/build.gni")
|
|||||||
declare_args() {
|
declare_args() {
|
||||||
libyuv_include_tests = !build_with_chromium
|
libyuv_include_tests = !build_with_chromium
|
||||||
libyuv_disable_jpeg = false
|
libyuv_disable_jpeg = false
|
||||||
|
libyuv_disable_rvv = false
|
||||||
libyuv_use_neon =
|
libyuv_use_neon =
|
||||||
current_cpu == "arm64" ||
|
current_cpu == "arm64" ||
|
||||||
(current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
|
(current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user