From 4068a5db6c60d890e4d49379d600fd34ee94fdec Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 8 May 2017 21:11:55 +0000 Subject: [PATCH] Revert "Ensure environment dependencies are correct" This reverts commit e78473c33ce9b4a827e814229836d136581ad80e. Reason for revert: Broke mac builds, which rely on $PATH to find xcrun Change-Id: I58711b94d472ab828823afaf53394a1aa869f3f5 --- android/config.go | 2 +- android/env.go | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/android/config.go b/android/config.go index e349336e2..8be16cfde 100644 --- a/android/config.go +++ b/android/config.go @@ -289,7 +289,7 @@ func (c *config) Getenv(key string) string { if c.envFrozen { panic("Cannot access new environment variables after envdeps are frozen") } - val, _ = originalEnv[key] + val = os.Getenv(key) c.envDeps[key] = val } return val diff --git a/android/env.go b/android/env.go index ec5794e36..c7409e872 100644 --- a/android/env.go +++ b/android/env.go @@ -15,9 +15,6 @@ package android import ( - "os" - "strings" - "android/soong/env" "github.com/google/blueprint" @@ -30,19 +27,6 @@ import ( // compare the contents of the environment variables, rewriting the file if necessary to cause // a manifest regeneration. -var originalEnv map[string]string - -func init() { - originalEnv = make(map[string]string) - for _, env := range os.Environ() { - idx := strings.IndexRune(env, '=') - if idx != -1 { - originalEnv[env[:idx]] = env[idx+1:] - } - } - os.Clearenv() -} - func EnvSingleton() blueprint.Singleton { return &envSingleton{} }