aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-05-08 21:13:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-05-08 21:13:53 +0000
commit411a363c5a7293879f43ec833561afe6a7e13dc6 (patch)
tree5e5578154f0b02f59f3b8c10b1a27d61bf8d12cc
parent6a76b144a9445fa3df0bd152cdae5a80526cb7e3 (diff)
parent4068a5db6c60d890e4d49379d600fd34ee94fdec (diff)
downloadbuild_soong-411a363c5a7293879f43ec833561afe6a7e13dc6.tar.gz
build_soong-411a363c5a7293879f43ec833561afe6a7e13dc6.tar.bz2
build_soong-411a363c5a7293879f43ec833561afe6a7e13dc6.zip
Merge "Revert "Ensure environment dependencies are correct""
-rw-r--r--android/config.go2
-rw-r--r--android/env.go16
2 files changed, 1 insertions, 17 deletions
diff --git a/android/config.go b/android/config.go
index e349336e..8be16cfd 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 ec5794e3..c7409e87 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{}
}