From 6fc7d528382716de9e417c9dcf0fddf109446e9f Mon Sep 17 00:00:00 2001 From: Pablo Marquez Tello Date: Tue, 13 Jul 2021 11:09:47 +0100 Subject: Override arch option to alow building for armv8-2a * This will override the values in the Android.bp file and allow building for armv8-2a for Android Q and R. * Resolved COMPMID-4645 Change-Id: I1e1c2a5ae7ee7399a63fffe9eb3009da3bfe0d93 Signed-off-by: Pablo Marquez Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5937 Tested-by: Arm Jenkins Reviewed-by: Nikhil Raj Arm Comments-Addressed: Arm Jenkins --- scripts/arm_compute_library_nn_driver.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/arm_compute_library_nn_driver.go') diff --git a/scripts/arm_compute_library_nn_driver.go b/scripts/arm_compute_library_nn_driver.go index 8b1b80a7a7..e17b15a7cd 100644 --- a/scripts/arm_compute_library_nn_driver.go +++ b/scripts/arm_compute_library_nn_driver.go @@ -14,12 +14,17 @@ import ( func globalFlags(ctx android.BaseContext) []string { var cppflags []string - if ctx.AConfig().PlatformVersionName() == "Q" || ctx.AConfig().PlatformVersionName() == "10" || + if ctx.AConfig().PlatformVersionName() == "Q" || ctx.AConfig().PlatformVersionName() == "10" || ctx.AConfig().PlatformVersionName() == "R" || ctx.AConfig().PlatformVersionName() == "11" || ctx.AConfig().PlatformVersionName() == "S" || ctx.AConfig().PlatformVersionName() == "12" { cppflags = append(cppflags, "-fno-addrsig") } + if (ctx.AConfig().PlatformVersionName() == "R" || ctx.AConfig().PlatformVersionName() == "11") && + (ctx.AConfig().DevicePrimaryArchType().String() == "armv8-2a") { + cppflags = append(cppflags, "-march=armv8.2-a+fp16") + } + data_types := strings.Split(ctx.AConfig().GetenvWithDefault("COMPUTE_LIB_DATA_TYPE", "ALL"), ",") for _, x := range data_types { -- cgit v1.2.1