aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/config.go
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-06-08 10:58:36 -0700
committerGeorge Burgess <gbiv@chromium.org>2020-06-24 02:31:08 +0000
commit163efaa5f94d595a94b97f87c418c3c2659eb6ef (patch)
tree4e0d86d7b5cc36779f54e7620ef8a164b7627e16 /compiler_wrapper/config.go
parent5cbe70b09083d9d496d8dad81187b04620355178 (diff)
downloadtoolchain-utils-163efaa5f94d595a94b97f87c418c3c2659eb6ef.tar.gz
wrapper: add support for Tricium clang-tidy
This adds a special `WITH_TIDY` mode that's specifically for use with Tricium. Crucially, this has us dump diagnostics as YAML, and stash a fair amount of information about each clang-tidy invocation in the same place where we dump YAML. These bits are intended to be used by the script added in I54ecc88d38faa4bfd502d632d3fd5c74734dabc0. BUG=chromium:1035951 TEST=Ran on all platform2 packages `emerge`able on amd64-generic. Change-Id: I63ef06dc6ddc016ebb6ba0c4a0cea8320fef7415 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2245785 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/config.go')
-rw-r--r--compiler_wrapper/config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler_wrapper/config.go b/compiler_wrapper/config.go
index a122b5a2..3c3668df 100644
--- a/compiler_wrapper/config.go
+++ b/compiler_wrapper/config.go
@@ -29,6 +29,8 @@ type config struct {
rootRelPath string
// Directory to store errors that were prevented with -Wno-error.
newWarningsDir string
+ // Directory to store nits in when using `WITH_TIDY=tricium`.
+ triciumNitsDir string
// Version. Only used for printing via -print-cmd.
version string
}
@@ -137,6 +139,7 @@ var crosHardenedConfig = &config{
"-Wno-implicit-int-float-conversion",
},
newWarningsDir: "/tmp/fatal_clang_warnings",
+ triciumNitsDir: "/tmp/linting_output/clang-tidy",
}
// Flags to be added to non-hardened toolchain.
@@ -166,6 +169,7 @@ var crosNonHardenedConfig = &config{
"-Wno-implicit-int-float-conversion",
},
newWarningsDir: "/tmp/fatal_clang_warnings",
+ triciumNitsDir: "/tmp/linting_output/clang-tidy",
}
// Flags to be added to host toolchain.
@@ -200,6 +204,7 @@ var crosHostConfig = &config{
"-Wno-implicit-int-float-conversion",
},
newWarningsDir: "/tmp/fatal_clang_warnings",
+ triciumNitsDir: "/tmp/linting_output/clang-tidy",
}
var androidConfig = &config{
@@ -211,4 +216,5 @@ var androidConfig = &config{
clangFlags: []string{},
clangPostFlags: []string{},
newWarningsDir: "",
+ triciumNitsDir: "",
}