blob: 1faa0f6f3604460cd3fb5365cb8059c7c45dd2c7 [file] [log] [blame]
Colin Cross1f7f3bd2016-07-27 10:12:38 -07001// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package art
16
Colin Cross6e95dd52016-09-12 15:37:10 -070017import (
18 "sort"
19 "strings"
20
21 "android/soong/android"
22)
Colin Cross1f7f3bd2016-07-27 10:12:38 -070023
24var (
25 pctx = android.NewPackageContext("android/soong/art")
26)
27
28func init() {
29 android.RegisterMakeVarsProvider(pctx, makeVarsProvider)
30}
31
32func makeVarsProvider(ctx android.MakeVarsContext) {
33 ctx.Strict("LIBART_IMG_HOST_BASE_ADDRESS", ctx.Config().LibartImgHostBaseAddress())
34 ctx.Strict("LIBART_IMG_TARGET_BASE_ADDRESS", ctx.Config().LibartImgDeviceBaseAddress())
Colin Cross6e95dd52016-09-12 15:37:10 -070035
36 testMap := testMap(ctx.Config())
37 var testNames []string
38 for name := range testMap {
39 testNames = append(testNames, name)
40 }
41
42 sort.Strings(testNames)
43
44 for _, name := range testNames {
45 ctx.Strict("ART_TEST_LIST_"+name, strings.Join(testMap[name], " "))
46 }
Colin Cross1f7f3bd2016-07-27 10:12:38 -070047}