Merge "Support abi check in mixed build."
This commit is contained in:
@@ -33,6 +33,7 @@ type CcInfo struct {
|
|||||||
TidyFiles []string
|
TidyFiles []string
|
||||||
TocFile string
|
TocFile string
|
||||||
UnstrippedOutput string
|
UnstrippedOutput string
|
||||||
|
AbiDiffFiles []string
|
||||||
}
|
}
|
||||||
|
|
||||||
type getOutputFilesRequestType struct{}
|
type getOutputFilesRequestType struct{}
|
||||||
@@ -174,6 +175,11 @@ clang_tidy_info = p.get("//build/bazel/rules/cc:clang_tidy.bzl%ClangTidyInfo")
|
|||||||
if clang_tidy_info:
|
if clang_tidy_info:
|
||||||
tidy_files = [v.path for v in clang_tidy_info.tidy_files.to_list()]
|
tidy_files = [v.path for v in clang_tidy_info.tidy_files.to_list()]
|
||||||
|
|
||||||
|
abi_diff_files = []
|
||||||
|
abi_diff_info = p.get("//build/bazel/rules/abi:abi_dump.bzl%AbiDiffInfo")
|
||||||
|
if abi_diff_info:
|
||||||
|
abi_diff_files = [f.path for f in abi_diff_info.diff_files.to_list()]
|
||||||
|
|
||||||
return json_encode({
|
return json_encode({
|
||||||
"OutputFiles": outputFiles,
|
"OutputFiles": outputFiles,
|
||||||
"CcObjectFiles": ccObjectFiles,
|
"CcObjectFiles": ccObjectFiles,
|
||||||
@@ -187,6 +193,7 @@ return json_encode({
|
|||||||
"TidyFiles": tidy_files,
|
"TidyFiles": tidy_files,
|
||||||
"TocFile": toc_file,
|
"TocFile": toc_file,
|
||||||
"UnstrippedOutput": unstripped,
|
"UnstrippedOutput": unstripped,
|
||||||
|
"AbiDiffFiles": abi_diff_files,
|
||||||
})`
|
})`
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -905,6 +905,10 @@ func (handler *ccLibraryBazelHandler) generateSharedBazelBuildActions(ctx androi
|
|||||||
}
|
}
|
||||||
handler.module.linker.(*libraryDecorator).tocFile = tocFile
|
handler.module.linker.(*libraryDecorator).tocFile = tocFile
|
||||||
|
|
||||||
|
if len(ccInfo.AbiDiffFiles) > 0 {
|
||||||
|
handler.module.linker.(*libraryDecorator).sAbiDiff = android.PathsForBazelOut(ctx, ccInfo.AbiDiffFiles)
|
||||||
|
}
|
||||||
|
|
||||||
ctx.SetProvider(SharedLibraryInfoProvider, SharedLibraryInfo{
|
ctx.SetProvider(SharedLibraryInfoProvider, SharedLibraryInfo{
|
||||||
TableOfContents: tocFile,
|
TableOfContents: tocFile,
|
||||||
SharedLibrary: outputFilePath,
|
SharedLibrary: outputFilePath,
|
||||||
|
Reference in New Issue
Block a user