Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95894d8f authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Define CLANG_TIDY_UNKNOWN_CFLAGS for build/make."

parents 7ca46785 ad47a27d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,13 @@ import (
	"strings"
)

// 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.
var ClangTidyUnknownCflags = sorted([]string{
	"-Wa,%",
})

func init() {
	// Most Android source files are not clang-tidy clean yet.
	// Global tidy checks include only google*, performance*,
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
	ctx.Strict("LLVM_OBJCOPY", "${config.ClangBin}/llvm-objcopy")
	ctx.Strict("LLVM_STRIP", "${config.ClangBin}/llvm-strip")
	ctx.Strict("PATH_TO_CLANG_TIDY", "${config.ClangBin}/clang-tidy")
	ctx.Strict("CLANG_TIDY_UNKNOWN_CFLAGS", strings.Join(config.ClangTidyUnknownCflags, " "))
	ctx.StrictSorted("CLANG_CONFIG_UNKNOWN_CFLAGS", strings.Join(config.ClangUnknownCflags, " "))

	ctx.Strict("RS_LLVM_PREBUILTS_VERSION", "${config.RSClangVersion}")