Remove more problematic env vars
I got a report of a user exporting CDPATH in their shell and causing
strange issues in the build. We should never need this value (and it
probably shouldn't be exported from the shell either -- that was their
workaround).
NDK_ROOT causes issues with Android.mk files thinking that they're
building with the ndk (like external/googletest/googletest/Android.mk).
Bug: 78933670
Test: CDPATH=. NDK_ROOT=test m; check out/soong.log
Change-Id: Icce43d7e31ed5e5e1fb7a4e37fd4dfbf421af4b1
diff --git a/ui/build/config.go b/ui/build/config.go
index aa60b3f..530c3a8 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -102,8 +102,10 @@
"OUT_DIR_COMMON_BASE",
// Variables that have caused problems in the past
+ "CDPATH",
"DISPLAY",
"GREP_OPTIONS",
+ "NDK_ROOT",
// Drop make flags
"MAKEFLAGS",