Revert "Ensure environment dependencies are correct"

This reverts commit e78473c33c.

Reason for revert: Broke mac builds, which rely on $PATH to find xcrun

Change-Id: I58711b94d472ab828823afaf53394a1aa869f3f5
This commit is contained in:
Dan Willemsen
2017-05-08 21:11:55 +00:00
parent e78473c33c
commit 4068a5db6c
2 changed files with 1 additions and 17 deletions

View File

@@ -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

View File

@@ -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{}
}