Fix the environment of soong_build:

- Incorporate BAZEL_* variables in soong.environment.available
- Set SOONG_DELVE when requested

Test: Manual.
Change-Id: I3ac675f4876220b788cc48d288b402ac6016c37b
This commit is contained in:
Lukacs T. Berki 2021-03-10 15:43:06 +01:00
parent 282671d696
commit b4ced9d886
1 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ func runSoong(ctx Context, config Config) {
envFile := filepath.Join(config.SoongOutDir(), "soong.environment.used")
getenv := func(k string) string {
v, _ := config.Environment().Get(k)
v, _ := soongBuildEnv.Get(k)
return v
}
if stale, _ := shared.StaleEnvFile(envFile, getenv); stale {
@ -187,7 +187,7 @@ func runSoong(ctx Context, config Config) {
// For debugging
if os.Getenv("SOONG_DELVE") != "" {
// SOONG_DELVE is already in cmd.Environment
ninjaEnv.Set("SOONG_DELVE", os.Getenv("SOONG_DELVE"))
ninjaEnv.Set("SOONG_DELVE_PATH", shared.ResolveDelveBinary())
}