From f113f3715ef590a336f1f022caa58b92ad7dd430 Mon Sep 17 00:00:00 2001 From: Pablo Marquez Tello Date: Tue, 20 Jul 2021 14:03:42 +0100 Subject: Print the Android version detected by the build system * Resolved COMPMID-4645 Change-Id: Iabb03630c7f5b1ded796dfcfd49f5fe8b65c86f3 Signed-off-by: Pablo Marquez Tello Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5972 Reviewed-by: Georgios Pinitas Tested-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- scripts/arm_compute_library_nn_driver.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/arm_compute_library_nn_driver.go b/scripts/arm_compute_library_nn_driver.go index 0a09e17516..eca6ab967e 100644 --- a/scripts/arm_compute_library_nn_driver.go +++ b/scripts/arm_compute_library_nn_driver.go @@ -1,5 +1,5 @@ // -// Copyright © 2020-2021 ARM Ltd. All rights reserved. +// Copyright © 2020-2021 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // @@ -9,6 +9,7 @@ import ( "android/soong/android" "android/soong/cc" "strings" + "fmt" ) func globalFlags(ctx android.BaseContext) []string { @@ -20,12 +21,14 @@ func globalFlags(ctx android.BaseContext) []string { cppflags = append(cppflags, "-fno-addrsig") } - if ((ctx.AConfig().PlatformVersionName() != "P" || ctx.AConfig().PlatformVersionName() != "9") && (ctx.AConfig().PlatformVersionName() == "R" || ctx.AConfig().PlatformVersionName() == "11")) { - if (ctx.AConfig().DevicePrimaryArchType().String() == "armv8-2a") { - cppflags = append(cppflags, "-march=armv8.2-a+fp16") - } - } - + if ctx.AConfig().PlatformVersionName() == "P" || ctx.AConfig().PlatformVersionName() == "9" { + fmt.Println("!! This is Android P!!") + } else if ctx.AConfig().PlatformVersionName() == "R" || ctx.AConfig().PlatformVersionName() == "11" { + fmt.Println("!! This is Android R!!") + if 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"), ",") -- cgit v1.2.1