diff --git a/cc/builder.go b/cc/builder.go index 1d12b5f09..59a8cc8af 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -687,6 +687,9 @@ func TransformObjToDynamicBinary(ctx android.ModuleContext, func TransformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Paths, soFile android.Path, baseName, exportedHeaderFlags string) android.OptionalPath { outputFile := android.PathForModuleOut(ctx, baseName+".lsdump") + sabiLock.Lock() + lsdumpPaths = append(lsdumpPaths, outputFile.String()) + sabiLock.Unlock() symbolFilterStr := "-so " + soFile.String() ctx.Build(pctx, android.BuildParams{ Rule: sAbiLink, diff --git a/cc/makevars.go b/cc/makevars.go index 779de8f3a..23910d33b 100644 --- a/cc/makevars.go +++ b/cc/makevars.go @@ -100,6 +100,9 @@ func makeVarsProvider(ctx android.MakeVarsContext) { ctx.Strict("LLNDK_LIBRARIES", strings.Join(llndkLibraries, " ")) ctx.Strict("VNDK_PRIVATE_LIBRARIES", strings.Join(vndkPrivateLibraries, " ")) + sort.Strings(lsdumpPaths) + ctx.Strict("LSDUMP_PATHS", strings.Join(lsdumpPaths, " ")) + ctx.Strict("ANDROID_WARNING_ALLOWED_PROJECTS", makeStringOfWarningAllowedProjects()) ctx.Strict("SOONG_MODULES_ADDED_WALL", makeStringOfKeys(ctx, modulesAddedWall)) ctx.Strict("SOONG_MODULES_USING_WNO_ERROR", makeStringOfKeys(ctx, modulesUsingWnoError)) diff --git a/cc/sabi.go b/cc/sabi.go index ec1d2468a..f5a7c774d 100644 --- a/cc/sabi.go +++ b/cc/sabi.go @@ -16,11 +16,17 @@ package cc import ( "strings" + "sync" "android/soong/android" "android/soong/cc/config" ) +var ( + lsdumpPaths []string + sabiLock sync.Mutex +) + type SAbiProperties struct { CreateSAbiDumps bool `blueprint:"mutated"` ReexportedIncludeFlags []string