Loading android/paths.go +3 −3 Original line number Diff line number Diff line Loading @@ -996,7 +996,7 @@ func pathForModule(ctx ModuleContext) OutputPath { // PathForVndkRefAbiDump returns an OptionalPath representing the path of the // reference abi dump for the given module. This is not guaranteed to be valid. func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, isLlndkOrNdk, isVndk, isGzip bool) OptionalPath { isNdk, isLlndkOrVndk, isGzip bool) OptionalPath { arches := ctx.DeviceConfig().Arches() if len(arches) == 0 { Loading @@ -1009,9 +1009,9 @@ func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, } var dirName string if isLlndkOrNdk { if isNdk { dirName = "ndk" } else if isVndk { } else if isLlndkOrVndk { dirName = "vndk" } else { dirName = "platform" // opt-in libs Loading cc/builder.go +0 −3 Original line number Diff line number Diff line Loading @@ -643,9 +643,6 @@ func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Path excludedSymbolVersions, excludedSymbolTags []string) android.OptionalPath { outputFile := android.PathForModuleOut(ctx, baseName+".lsdump") sabiLock.Lock() lsdumpPaths = append(lsdumpPaths, outputFile.String()) sabiLock.Unlock() implicits := android.Paths{soFile} symbolFilterStr := "-so " + soFile.String() Loading cc/library.go +39 −15 Original line number Diff line number Diff line Loading @@ -432,26 +432,47 @@ func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags, d return flags } func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bool { if !ctx.shouldCreateSourceAbiDump() { return false } if library.Properties.Header_abi_checker.Enabled != nil { return Bool(library.Properties.Header_abi_checker.Enabled) // Returns a string that represents the class of the ABI dump. // Returns an empty string if ABI check is disabled for this library. func (library *libraryDecorator) classifySourceAbiDump(ctx ModuleContext) string { enabled := library.Properties.Header_abi_checker.Enabled if enabled != nil && !Bool(enabled) { return "" } // Return NDK if the library is both NDK and LLNDK. if ctx.isNdk() { return true return "NDK" } if ctx.isLlndkPublic(ctx.Config()) { return true return "LLNDK" } if ctx.useVndk() && ctx.isVndk() && !ctx.isVndkPrivate(ctx.Config()) { // Return true if this is VNDK-core, VNDK-SP, or VNDK-Ext, and not // VNDK-private. return true if ctx.isVndkSp() { if ctx.isVndkExt() { return "VNDK-SP-ext" } else { return "VNDK-SP" } } else { if ctx.isVndkExt() { return "VNDK-ext" } else { return "VNDK-core" } } } if enabled != nil && Bool(enabled) { return "PLATFORM" } return "" } func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bool { if !ctx.shouldCreateSourceAbiDump() { return false } return library.classifySourceAbiDump(ctx) != "" } func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects { if library.buildStubs() { Loading Loading @@ -820,10 +841,11 @@ func (library *libraryDecorator) coverageOutputFilePath() android.OptionalPath { } func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android.Path { isLlndkOrNdk := inList(ctx.baseModuleName(), *llndkLibraries(ctx.Config())) || inList(ctx.baseModuleName(), ndkMigratedLibs) isNdk := ctx.isNdk() isLlndkOrVndk := ctx.isLlndkPublic(ctx.Config()) || ctx.isVndk() refAbiDumpTextFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isLlndkOrNdk, ctx.isVndk(), false) refAbiDumpGzipFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isLlndkOrNdk, ctx.isVndk(), true) refAbiDumpTextFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isNdk, isLlndkOrVndk, false) refAbiDumpGzipFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isNdk, isLlndkOrVndk, true) if refAbiDumpTextFile.Valid() { if refAbiDumpGzipFile.Valid() { Loading Loading @@ -861,6 +883,8 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec library.Properties.Header_abi_checker.Exclude_symbol_versions, library.Properties.Header_abi_checker.Exclude_symbol_tags) addLsdumpPath(library.classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String()) refAbiDumpFile := getRefAbiDumpFile(ctx, vndkVersion, fileName) if refAbiDumpFile != nil { library.sAbiDiff = SourceAbiDiff(ctx, library.sAbiOutputFile.Path(), Loading cc/sabi.go +6 −0 Original line number Diff line number Diff line Loading @@ -94,3 +94,9 @@ func sabiDepsMutator(mctx android.TopDownMutatorContext) { }) } } func addLsdumpPath(lsdumpPath string) { sabiLock.Lock() lsdumpPaths = append(lsdumpPaths, lsdumpPath) sabiLock.Unlock() } Loading
android/paths.go +3 −3 Original line number Diff line number Diff line Loading @@ -996,7 +996,7 @@ func pathForModule(ctx ModuleContext) OutputPath { // PathForVndkRefAbiDump returns an OptionalPath representing the path of the // reference abi dump for the given module. This is not guaranteed to be valid. func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, isLlndkOrNdk, isVndk, isGzip bool) OptionalPath { isNdk, isLlndkOrVndk, isGzip bool) OptionalPath { arches := ctx.DeviceConfig().Arches() if len(arches) == 0 { Loading @@ -1009,9 +1009,9 @@ func PathForVndkRefAbiDump(ctx ModuleContext, version, fileName string, } var dirName string if isLlndkOrNdk { if isNdk { dirName = "ndk" } else if isVndk { } else if isLlndkOrVndk { dirName = "vndk" } else { dirName = "platform" // opt-in libs Loading
cc/builder.go +0 −3 Original line number Diff line number Diff line Loading @@ -643,9 +643,6 @@ func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Path excludedSymbolVersions, excludedSymbolTags []string) android.OptionalPath { outputFile := android.PathForModuleOut(ctx, baseName+".lsdump") sabiLock.Lock() lsdumpPaths = append(lsdumpPaths, outputFile.String()) sabiLock.Unlock() implicits := android.Paths{soFile} symbolFilterStr := "-so " + soFile.String() Loading
cc/library.go +39 −15 Original line number Diff line number Diff line Loading @@ -432,26 +432,47 @@ func (library *libraryDecorator) compilerFlags(ctx ModuleContext, flags Flags, d return flags } func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bool { if !ctx.shouldCreateSourceAbiDump() { return false } if library.Properties.Header_abi_checker.Enabled != nil { return Bool(library.Properties.Header_abi_checker.Enabled) // Returns a string that represents the class of the ABI dump. // Returns an empty string if ABI check is disabled for this library. func (library *libraryDecorator) classifySourceAbiDump(ctx ModuleContext) string { enabled := library.Properties.Header_abi_checker.Enabled if enabled != nil && !Bool(enabled) { return "" } // Return NDK if the library is both NDK and LLNDK. if ctx.isNdk() { return true return "NDK" } if ctx.isLlndkPublic(ctx.Config()) { return true return "LLNDK" } if ctx.useVndk() && ctx.isVndk() && !ctx.isVndkPrivate(ctx.Config()) { // Return true if this is VNDK-core, VNDK-SP, or VNDK-Ext, and not // VNDK-private. return true if ctx.isVndkSp() { if ctx.isVndkExt() { return "VNDK-SP-ext" } else { return "VNDK-SP" } } else { if ctx.isVndkExt() { return "VNDK-ext" } else { return "VNDK-core" } } } if enabled != nil && Bool(enabled) { return "PLATFORM" } return "" } func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bool { if !ctx.shouldCreateSourceAbiDump() { return false } return library.classifySourceAbiDump(ctx) != "" } func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects { if library.buildStubs() { Loading Loading @@ -820,10 +841,11 @@ func (library *libraryDecorator) coverageOutputFilePath() android.OptionalPath { } func getRefAbiDumpFile(ctx ModuleContext, vndkVersion, fileName string) android.Path { isLlndkOrNdk := inList(ctx.baseModuleName(), *llndkLibraries(ctx.Config())) || inList(ctx.baseModuleName(), ndkMigratedLibs) isNdk := ctx.isNdk() isLlndkOrVndk := ctx.isLlndkPublic(ctx.Config()) || ctx.isVndk() refAbiDumpTextFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isLlndkOrNdk, ctx.isVndk(), false) refAbiDumpGzipFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isLlndkOrNdk, ctx.isVndk(), true) refAbiDumpTextFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isNdk, isLlndkOrVndk, false) refAbiDumpGzipFile := android.PathForVndkRefAbiDump(ctx, vndkVersion, fileName, isNdk, isLlndkOrVndk, true) if refAbiDumpTextFile.Valid() { if refAbiDumpGzipFile.Valid() { Loading Loading @@ -861,6 +883,8 @@ func (library *libraryDecorator) linkSAbiDumpFiles(ctx ModuleContext, objs Objec library.Properties.Header_abi_checker.Exclude_symbol_versions, library.Properties.Header_abi_checker.Exclude_symbol_tags) addLsdumpPath(library.classifySourceAbiDump(ctx) + ":" + library.sAbiOutputFile.String()) refAbiDumpFile := getRefAbiDumpFile(ctx, vndkVersion, fileName) if refAbiDumpFile != nil { library.sAbiDiff = SourceAbiDiff(ctx, library.sAbiOutputFile.Path(), Loading
cc/sabi.go +6 −0 Original line number Diff line number Diff line Loading @@ -94,3 +94,9 @@ func sabiDepsMutator(mctx android.TopDownMutatorContext) { }) } } func addLsdumpPath(lsdumpPath string) { sabiLock.Lock() lsdumpPaths = append(lsdumpPaths, lsdumpPath) sabiLock.Unlock() }