summaryrefslogtreecommitdiff
path: root/build/codegen.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-07-31 13:47:39 -0700
committer Colin Cross <ccross@android.com> 2019-12-30 15:39:19 -0800
commitdd3b7aa3066673eb95ec46ae8fb9651e52e1ee13 (patch)
tree3a0264195095bccad49acd2298bf281cd3018e90 /build/codegen.go
parenteeae32ba02c7d3785a8d195e967febfaa0b1113b (diff)
Clean up art's Soong go files
Replace deprecated BaseContext with LoadHookContext. Use ctx.Config() instead of ctx.AConfig(). Use existing ctx.Config() functions instead of wrappers. Sort imports. Test: m checkbuild Change-Id: Idf30996ef38f4056a93af511c607b2c24678a5fa
Diffstat (limited to 'build/codegen.go')
-rw-r--r--build/codegen.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/build/codegen.go b/build/codegen.go
index 8e5ef1a609..7ada8f5eb7 100644
--- a/build/codegen.go
+++ b/build/codegen.go
@@ -19,9 +19,10 @@ package art
// arches on the device.
import (
- "android/soong/android"
"sort"
"strings"
+
+ "android/soong/android"
)
type moduleType struct {
@@ -40,14 +41,14 @@ var (
func codegen(ctx android.LoadHookContext, c *codegenProperties, t moduleType) {
var hostArches, deviceArches []string
- e := envDefault(ctx, "ART_HOST_CODEGEN_ARCHS", "")
+ e := ctx.Config().Getenv("ART_HOST_CODEGEN_ARCHS")
if e == "" {
hostArches = supportedArches
} else {
hostArches = strings.Split(e, " ")
}
- e = envDefault(ctx, "ART_TARGET_CODEGEN_ARCHS", "")
+ e = ctx.Config().Getenv("ART_TARGET_CODEGEN_ARCHS")
if e == "" {
deviceArches = defaultDeviceCodegenArches(ctx)
} else {