Merge "Limit environment during ninja" am: 2de4152e61 am: 8c296553c0 am: 198df9f892
Change-Id: I51a400733bd2d91930d290590a5896a973bdfab2
diff --git a/ui/build/ninja.go b/ui/build/ninja.go
index 5357d44..57a074d 100644
--- a/ui/build/ninja.go
+++ b/ui/build/ninja.go
@@ -93,7 +93,9 @@
//
// 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",