aboutsummaryrefslogtreecommitdiff
path: root/scripts/arm_compute_library_nn_driver.go
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/arm_compute_library_nn_driver.go')
-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"), ",")