Define PATH_TO_CLANG_TIDY_SHELL for build/make rules.
* PATH_TO_CLANG_TIDY_SHELL is ${config.ClangTidyShellPath}, wich is "build/soong/scripts/clang-tidy.sh" Bug: 110538415 Test: build with WITH_TIDY=1 Change-Id: I27d7be095c998583fa9ad4d705aa1332bd018140
This commit is contained in:
parent
09664bd9a5
commit
b699c43f89
|
@ -150,12 +150,10 @@ var (
|
|||
},
|
||||
"crossCompile")
|
||||
|
||||
_ = pctx.SourcePathVariable("tidyPath", "build/soong/scripts/clang-tidy.sh")
|
||||
|
||||
clangTidy = pctx.AndroidStaticRule("clangTidy",
|
||||
blueprint.RuleParams{
|
||||
Command: "rm -f $out && CLANG_TIDY=${config.ClangBin}/clang-tidy $tidyPath $tidyFlags $in -- $cFlags && touch $out",
|
||||
CommandDeps: []string{"${config.ClangBin}/clang-tidy", "$tidyPath"},
|
||||
Command: "rm -f $out && CLANG_TIDY=${config.ClangBin}/clang-tidy ${config.ClangTidyShellPath} $tidyFlags $in -- $cFlags && touch $out",
|
||||
CommandDeps: []string{"${config.ClangBin}/clang-tidy", "${config.ClangTidyShellPath}"},
|
||||
},
|
||||
"cFlags", "tidyFlags")
|
||||
|
||||
|
|
|
@ -209,6 +209,7 @@ func init() {
|
|||
})
|
||||
pctx.StaticVariable("ClangPath", "${ClangBase}/${HostPrebuiltTag}/${ClangVersion}")
|
||||
pctx.StaticVariable("ClangBin", "${ClangPath}/bin")
|
||||
pctx.StaticVariable("ClangTidyShellPath", "build/soong/scripts/clang-tidy.sh")
|
||||
|
||||
pctx.VariableFunc("ClangShortVersion", func(ctx android.PackageVarContext) string {
|
||||
if override := ctx.Config().Getenv("LLVM_RELEASE_VERSION"); override != "" {
|
||||
|
|
|
@ -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("PATH_TO_CLANG_TIDY_SHELL", "${config.ClangTidyShellPath}")
|
||||
ctx.StrictSorted("CLANG_CONFIG_UNKNOWN_CFLAGS", strings.Join(config.ClangUnknownCflags, " "))
|
||||
|
||||
ctx.Strict("RS_LLVM_PREBUILTS_VERSION", "${config.RSClangVersion}")
|
||||
|
|
Loading…
Reference in New Issue