aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPablo Marquez Tello <pablo.tello@arm.com>2021-07-20 14:03:42 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-07-22 10:35:30 +0000
commitf113f3715ef590a336f1f022caa58b92ad7dd430 (patch)
treeac5ec18494509a0368f44200fe1cbbaf73120b52 /scripts
parentf4e84fb112d9b17b487d3e99aeb53700818d04fd (diff)
downloadComputeLibrary-f113f3715ef590a336f1f022caa58b92ad7dd430.tar.gz
Print the Android version detected by the build system
* Resolved COMPMID-4645 Change-Id: Iabb03630c7f5b1ded796dfcfd49f5fe8b65c86f3 Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5972 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/arm_compute_library_nn_driver.go17
1 files changed, 10 insertions, 7 deletions
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"), ",")