Support abi check in mixed build.
Bug: 253498204 Test: Manual tested. Change-Id: I451a6109a2a7efa24bafc860b7b757e23fde09e1
This commit is contained in:
@@ -33,6 +33,7 @@ type CcInfo struct {
|
||||
TidyFiles []string
|
||||
TocFile string
|
||||
UnstrippedOutput string
|
||||
AbiDiffFiles []string
|
||||
}
|
||||
|
||||
type getOutputFilesRequestType struct{}
|
||||
@@ -174,6 +175,11 @@ clang_tidy_info = p.get("//build/bazel/rules/cc:clang_tidy.bzl%ClangTidyInfo")
|
||||
if clang_tidy_info:
|
||||
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({
|
||||
"OutputFiles": outputFiles,
|
||||
"CcObjectFiles": ccObjectFiles,
|
||||
@@ -187,6 +193,7 @@ return json_encode({
|
||||
"TidyFiles": tidy_files,
|
||||
"TocFile": toc_file,
|
||||
"UnstrippedOutput": unstripped,
|
||||
"AbiDiffFiles": abi_diff_files,
|
||||
})`
|
||||
|
||||
}
|
||||
|
@@ -898,6 +898,10 @@ func (handler *ccLibraryBazelHandler) generateSharedBazelBuildActions(ctx androi
|
||||
}
|
||||
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{
|
||||
TableOfContents: tocFile,
|
||||
SharedLibrary: outputFilePath,
|
||||
|
Reference in New Issue
Block a user