diff options
author | Chih-Hung Hsieh <chh@google.com> | 2018-07-26 15:00:28 -0700 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2018-07-26 15:00:28 -0700 |
commit | 5942fe4fd1baccd9c417c0016d940934f251e229 (patch) | |
tree | 815814fba0d16f7b9da2b9ba3efbd23bd2d3219f | |
parent | 667f688f361ed732d4209cc38e73335425cd2e2c (diff) | |
download | build_soong-5942fe4fd1baccd9c417c0016d940934f251e229.tar.gz build_soong-5942fe4fd1baccd9c417c0016d940934f251e229.tar.bz2 build_soong-5942fe4fd1baccd9c417c0016d940934f251e229.zip |
Do not pass -flto and -fsanitize flags to clang-tidy.
Some flags stop clang-tidy to search included header files.
Bug: 111885396
Test: run with WITH_TIDY=1
Change-Id: Ie1ac37298793c015286db0f5caa252b67f4db365
-rw-r--r-- | cc/config/tidy.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/config/tidy.go b/cc/config/tidy.go index 5d53a8cd..079cf256 100644 --- a/cc/config/tidy.go +++ b/cc/config/tidy.go @@ -22,8 +22,11 @@ import ( // clang-tidy doesn't recognize every flag that clang does. This is unlikely to // be a complete list, but we can populate this with the ones we know to avoid // issues with clang-diagnostic-unused-command-line-argument. +// b/111885396: -flto affected header include directory; -fsanitize needs -flto. var ClangTidyUnknownCflags = sorted([]string{ "-Wa,%", + "-flto", + "-fsanitize=%", }) func init() { |