pass TIDY_EXTERNAL_VENDOR envvar to Bazel
Bug: 268668248
Test: verify that Bazel tidy actions don't have a large diff from Soong tidy actions:
(add -v to Ninja invocation in ui/build/ninja.go [and disable fifo file])
WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd 2>&1 | tee soong_build-tidy.adbd &&
WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd --bazel-mode-staging 2>&1 | tee mixed_build-tidy.adbd &&
grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" soong_build-tidy.adbd | sort -u > soong-clang-tidy.adbd &&
grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" mixed_build-tidy.adbd | sort -u > mixed-clang-tidy.adbd &&
vimdiff soong_build-tidy.adbd mixed_build-tidy.adbd
Change-Id: I22804d6d92ed56d9727eaf430318df0b041712a8
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 17d0124..ad21a2e 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -45,11 +45,14 @@
CommandDeps: []string{"${bazelBuildRunfilesTool}"},
}, "outDir")
allowedBazelEnvironmentVars = []string{
+ // clang-tidy
"ALLOW_LOCAL_TIDY_TRUE",
"DEFAULT_TIDY_HEADER_DIRS",
"TIDY_TIMEOUT",
"WITH_TIDY",
"WITH_TIDY_FLAGS",
+ "TIDY_EXTERNAL_VENDOR",
+
"SKIP_ABI_CHECKS",
"UNSAFE_DISABLE_APEX_ALLOWED_DEPS_CHECK",
"AUTO_ZERO_INITIALIZE",