From 8cb363f62b57954ace161789eb7fa692a24f29a4 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 17 Oct 2019 07:44:13 -0700 Subject: compiler_wrapper: remove WITH_TIDY support for android. Also consolidates most of the android specific logic into one place so it's clear which flags are used and which ones are not. Also detects wrapping of clang-tidy for future special casing. BUG=chromium:773875 TEST=unit tests, golden tests TEST=android's test_compiler.py --with-tidy Change-Id: Ic83340ba63ec3ea4c3c174069d3dc017ecbcdd72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1866603 Tested-by: Tobias Bosch Reviewed-by: George Burgess --- compiler_wrapper/android_config_test.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'compiler_wrapper/android_config_test.go') diff --git a/compiler_wrapper/android_config_test.go b/compiler_wrapper/android_config_test.go index 4e2f1f5c..104be6df 100644 --- a/compiler_wrapper/android_config_test.go +++ b/compiler_wrapper/android_config_test.go @@ -35,6 +35,7 @@ func createAndroidClangPathGoldenInputs(ctx *testContext) goldenFile { gomaPath := path.Join(ctx.tempDir, "gomacc") ctx.writeFile(gomaPath, "") defaultPath := filepath.Join(ctx.tempDir, "clang") + clangTidyPath := filepath.Join(ctx.tempDir, "clang-tidy") deepPath := "a/b/c/d/e/f/g/clang" linkedDeepPath := "symlinked/clang_other" @@ -51,12 +52,22 @@ func createAndroidClangPathGoldenInputs(ctx *testContext) goldenFile { WrapperCmd: newGoldenCmd(defaultPath, mainCc), Cmds: errorResults, }, + { + Env: []string{"WITH_TIDY=1"}, + WrapperCmd: newGoldenCmd(defaultPath, mainCc), + Cmds: okResults, + }, { WrapperCmd: newGoldenCmd(filepath.Join(ctx.tempDir, "clang++"), mainCc), Cmds: okResults, }, { - WrapperCmd: newGoldenCmd(filepath.Join(ctx.tempDir, "clang-tidy"), mainCc), + WrapperCmd: newGoldenCmd(clangTidyPath, mainCc), + Cmds: okResults, + }, + { + Env: []string{"WITH_TIDY=1"}, + WrapperCmd: newGoldenCmd(clangTidyPath, mainCc), Cmds: okResults, }, { -- cgit v1.2.3