Pass TARGET_DEVICE_DIR from dumpvars to later kati runs

The find commands used to locate the BoardConfig.mk can't be optimized
by Kati, so we're currently spending ~125ms three times during every
build (dumpvars, cleanspec, and the main kati run). Preserve the value
of TARGET_DEVICE_DIR from the dumpvars run so that we only need to run
the find commands once.

Bug: 78020936
Test: out/build-taimen.ninja is identical
Test: out/soong.log shows that we're not running these finds again
Change-Id: Iee56b454c3661de2b58c161169218ecaf2135398
diff --git a/ui/build/kati.go b/ui/build/kati.go
index a73ebdf..752a2c2 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -94,7 +94,8 @@
 	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 @@
 		"-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...)