aboutsummaryrefslogtreecommitdiffstats
path: root/ui/build
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2020-01-02 20:12:09 -0800
committerDan Willemsen <dwillemsen@google.com>2020-01-03 15:36:33 -0800
commit260db53da3aa43c23b33081922f4954e73008d64 (patch)
tree50d69dbbc945c9f165de753a884c38e5c901ecc3 /ui/build
parente33363598325fd35e302fccce6927d0a29086630 (diff)
downloadbuild_soong-260db53da3aa43c23b33081922f4954e73008d64.tar.gz
build_soong-260db53da3aa43c23b33081922f4954e73008d64.tar.bz2
build_soong-260db53da3aa43c23b33081922f4954e73008d64.zip
Limit environment during ninja
See the change that added ALLOW_NINJA_ENV for more information. Test: m nothing; check out/soong.log for small list Test: ALLOW_NINJA_ENV=true m nothing; check out/soong.log Change-Id: I7761c6a07a7f8b0acee107e9c27c7739dd4b63ab
Diffstat (limited to 'ui/build')
-rw-r--r--ui/build/ninja.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/build/ninja.go b/ui/build/ninja.go
index 5357d44c..57a074d3 100644
--- a/ui/build/ninja.go
+++ b/ui/build/ninja.go
@@ -93,7 +93,9 @@ func runNinja(ctx Context, config Config) {
//
// For the majority of cases, either Soong or the makefiles should be replicating any
// necessary environment variables in the command line of each action that needs it.
- if cmd.Environment.IsFalse("ALLOW_NINJA_ENV") {
+ if cmd.Environment.IsEnvTrue("ALLOW_NINJA_ENV") {
+ ctx.Println("Allowing all environment variables during ninja; incremental builds may be unsafe.")
+ } else {
cmd.Environment.Allow(append([]string{
"ASAN_SYMBOLIZER_PATH",
"HOME",