aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2018-05-02 17:35:34 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-02 17:35:34 +0000
commitd08726ac7691f6c8f2733fec755809fb50d186f4 (patch)
tree8376994f2cbeca7d379bb7ddbebdea82d92f343d
parent96bbc2ff22342a15ee1907df8de849f512f66c91 (diff)
parent6ab79db2e6f1bba829c241578c1985d7cf01ccfe (diff)
downloadbuild_soong-d08726ac7691f6c8f2733fec755809fb50d186f4.tar.gz
build_soong-d08726ac7691f6c8f2733fec755809fb50d186f4.tar.bz2
build_soong-d08726ac7691f6c8f2733fec755809fb50d186f4.zip
Merge "Pass TARGET_DEVICE_DIR from dumpvars to later kati runs"
-rw-r--r--ui/build/config.go17
-rw-r--r--ui/build/dumpvars.go4
-rw-r--r--ui/build/kati.go4
3 files changed, 20 insertions, 5 deletions
diff --git a/ui/build/config.go b/ui/build/config.go
index 530c3a89..5622dff6 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -44,10 +44,11 @@ type configImpl struct {
skipMake bool
// From the product config
- katiArgs []string
- ninjaArgs []string
- katiSuffix string
- targetDevice string
+ katiArgs []string
+ ninjaArgs []string
+ katiSuffix string
+ targetDevice string
+ targetDeviceDir string
brokenDupRules bool
}
@@ -568,3 +569,11 @@ func (c *configImpl) SetBuildBrokenDupRules(val bool) {
func (c *configImpl) BuildBrokenDupRules() bool {
return c.brokenDupRules
}
+
+func (c *configImpl) SetTargetDeviceDir(dir string) {
+ c.targetDeviceDir = dir
+}
+
+func (c *configImpl) TargetDeviceDir() string {
+ return c.targetDeviceDir
+}
diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go
index eb43ed65..cc9e7429 100644
--- a/ui/build/dumpvars.go
+++ b/ui/build/dumpvars.go
@@ -157,6 +157,9 @@ func runMakeProductConfig(ctx Context, config Config) {
// To find target/product/<DEVICE>
"TARGET_DEVICE",
+ // So that later Kati runs can find BoardConfig.mk faster
+ "TARGET_DEVICE_DIR",
+
// Whether --werror_overriding_commands will work
"BUILD_BROKEN_DUP_RULES",
}, exportEnvVars...), BannerVars...)
@@ -182,6 +185,7 @@ func runMakeProductConfig(ctx Context, config Config) {
config.SetKatiArgs(strings.Fields(make_vars["KATI_GOALS"]))
config.SetNinjaArgs(strings.Fields(make_vars["NINJA_GOALS"]))
config.SetTargetDevice(make_vars["TARGET_DEVICE"])
+ config.SetTargetDeviceDir(make_vars["TARGET_DEVICE_DIR"])
config.SetBuildBrokenDupRules(make_vars["BUILD_BROKEN_DUP_RULES"] != "false")
}
diff --git a/ui/build/kati.go b/ui/build/kati.go
index a73ebdf6..752a2c24 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -94,7 +94,8 @@ func runKati(ctx Context, config Config) {
args = append(args,
"BUILDING_WITH_NINJA=true",
"SOONG_ANDROID_MK="+config.SoongAndroidMk(),
- "SOONG_MAKEVARS_MK="+config.SoongMakeVarsMk())
+ "SOONG_MAKEVARS_MK="+config.SoongMakeVarsMk(),
+ "TARGET_DEVICE_DIR="+config.TargetDeviceDir())
if config.UseGoma() {
args = append(args, "-j"+strconv.Itoa(config.Parallel()))
@@ -199,6 +200,7 @@ func runKatiCleanSpec(ctx Context, config Config) {
"-f", "build/make/core/cleanbuild.mk",
"BUILDING_WITH_NINJA=true",
"SOONG_MAKEVARS_MK=" + config.SoongMakeVarsMk(),
+ "TARGET_DEVICE_DIR=" + config.TargetDeviceDir(),
}
cmd := Command(ctx, config, "ckati", executable, args...)