1// 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 17import ( 18 "sort" 19 "strings" 20 21 "android/soong/android" 22) 23 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()) 35 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 } 47} 48