Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d08726ac authored by android-build-prod (mdb)'s avatar android-build-prod (mdb) Committed by Gerrit Code Review
Browse files

Merge "Pass TARGET_DEVICE_DIR from dumpvars to later kati runs"

parents 96bbc2ff 6ab79db2
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ type configImpl struct {
	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
}
+4 −0
Original line number Diff line number Diff line
@@ -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")
}
+3 −1
Original line number Diff line number Diff line
@@ -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...)