From f67034e7f52596eece094b37fb386c946e1b87ee Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 23 Jul 2021 12:21:46 +0100 Subject: Fix NN driver build script for Android R Change-Id: If10bfb27b09915bb1f46380a79a2d51bda342dbd Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5982 Tested-by: Arm Jenkins Reviewed-by: Nikhil Raj Arm --- scripts/arm_compute_library_nn_driver.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/arm_compute_library_nn_driver.go b/scripts/arm_compute_library_nn_driver.go index cf9c99e208..2461838d4f 100644 --- a/scripts/arm_compute_library_nn_driver.go +++ b/scripts/arm_compute_library_nn_driver.go @@ -21,9 +21,12 @@ func globalFlags(ctx android.BaseContext) []string { } if ctx.AConfig().PlatformVersionName() == "R" || ctx.AConfig().PlatformVersionName() == "11" { - if ctx.AConfig().Targets[Android][0].Arch.ArchType.String() == "armv8-2a" { - cppflags = append(cppflags, "-march=armv8.2-a+fp16") - } + for _, a := range ctx.DeviceConfig().Arches() { + theArch := a.ArchType.String() + if theArch == "armv8-2a" { + cppflags = append(cppflags, "-march=armv8.2-a+fp16") + } + } } data_types := strings.Split(ctx.AConfig().GetenvWithDefault("COMPUTE_LIB_DATA_TYPE", "ALL"), ",") -- cgit v1.2.1