Loading cc/builder.go +1 −2 Original line number Diff line number Diff line Loading @@ -949,8 +949,7 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD } // Generate a rule for extracting a table of contents from a shared library (.so) func transformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath, flags builderFlags) { func TransformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath) { var format string if ctx.Darwin() { Loading cc/library.go +1 −1 Original line number Diff line number Diff line Loading @@ -1377,7 +1377,7 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := outputFile.ReplaceExtension(ctx, flags.Toolchain.ShlibSuffix()[1:]+".toc") library.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags) TransformSharedObjectToToc(ctx, outputFile, tocFile) stripFlags := flagsToStripFlags(flags) needsStrip := library.stripper.NeedsStrip(ctx) Loading cc/prebuilt.go +1 −3 Original line number Diff line number Diff line Loading @@ -114,8 +114,6 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext, // TODO(ccross): verify shared library dependencies srcs := p.prebuiltSrcs(ctx) if len(srcs) > 0 { builderFlags := flagsToBuilderFlags(flags) if len(srcs) > 1 { ctx.PropertyErrorf("srcs", "multiple prebuilt source files") return nil Loading Loading @@ -152,7 +150,7 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags) TransformSharedObjectToToc(ctx, outputFile, tocFile) if ctx.Windows() && p.properties.Windows_import_lib != nil { // Consumers of this library actually links to the import library in build Loading cc/snapshot_prebuilt.go +1 −2 Original line number Diff line number Diff line Loading @@ -476,13 +476,12 @@ func (p *snapshotLibraryDecorator) link(ctx ModuleContext, flags Flags, deps Pat if p.shared() { libName := in.Base() builderFlags := flagsToBuilderFlags(flags) // Optimize out relinking against shared libraries whose interface hasn't changed by // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, in, tocFile, builderFlags) TransformSharedObjectToToc(ctx, in, tocFile) ctx.SetProvider(SharedLibraryInfoProvider, SharedLibraryInfo{ SharedLibrary: in, Loading cc/vndk_prebuilt.go +1 −2 Original line number Diff line number Diff line Loading @@ -144,7 +144,6 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext, // current VNDK prebuilts are only shared libs. in := p.singleSourcePath(ctx) builderFlags := flagsToBuilderFlags(flags) p.unstrippedOutputFile = in libName := in.Base() if p.stripper.NeedsStrip(ctx) { Loading @@ -158,7 +157,7 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, in, tocFile, builderFlags) TransformSharedObjectToToc(ctx, in, tocFile) p.androidMkSuffix = p.NameSuffix() Loading Loading
cc/builder.go +1 −2 Original line number Diff line number Diff line Loading @@ -949,8 +949,7 @@ func sourceAbiDiff(ctx android.ModuleContext, inputDump android.Path, referenceD } // Generate a rule for extracting a table of contents from a shared library (.so) func transformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath, flags builderFlags) { func TransformSharedObjectToToc(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath) { var format string if ctx.Darwin() { Loading
cc/library.go +1 −1 Original line number Diff line number Diff line Loading @@ -1377,7 +1377,7 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := outputFile.ReplaceExtension(ctx, flags.Toolchain.ShlibSuffix()[1:]+".toc") library.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags) TransformSharedObjectToToc(ctx, outputFile, tocFile) stripFlags := flagsToStripFlags(flags) needsStrip := library.stripper.NeedsStrip(ctx) Loading
cc/prebuilt.go +1 −3 Original line number Diff line number Diff line Loading @@ -114,8 +114,6 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext, // TODO(ccross): verify shared library dependencies srcs := p.prebuiltSrcs(ctx) if len(srcs) > 0 { builderFlags := flagsToBuilderFlags(flags) if len(srcs) > 1 { ctx.PropertyErrorf("srcs", "multiple prebuilt source files") return nil Loading Loading @@ -152,7 +150,7 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags) TransformSharedObjectToToc(ctx, outputFile, tocFile) if ctx.Windows() && p.properties.Windows_import_lib != nil { // Consumers of this library actually links to the import library in build Loading
cc/snapshot_prebuilt.go +1 −2 Original line number Diff line number Diff line Loading @@ -476,13 +476,12 @@ func (p *snapshotLibraryDecorator) link(ctx ModuleContext, flags Flags, deps Pat if p.shared() { libName := in.Base() builderFlags := flagsToBuilderFlags(flags) // Optimize out relinking against shared libraries whose interface hasn't changed by // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, in, tocFile, builderFlags) TransformSharedObjectToToc(ctx, in, tocFile) ctx.SetProvider(SharedLibraryInfoProvider, SharedLibraryInfo{ SharedLibrary: in, Loading
cc/vndk_prebuilt.go +1 −2 Original line number Diff line number Diff line Loading @@ -144,7 +144,6 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext, // current VNDK prebuilts are only shared libs. in := p.singleSourcePath(ctx) builderFlags := flagsToBuilderFlags(flags) p.unstrippedOutputFile = in libName := in.Base() if p.stripper.NeedsStrip(ctx) { Loading @@ -158,7 +157,7 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext, // depending on a table of contents file instead of the library itself. tocFile := android.PathForModuleOut(ctx, libName+".toc") p.tocFile = android.OptionalPathForPath(tocFile) transformSharedObjectToToc(ctx, in, tocFile, builderFlags) TransformSharedObjectToToc(ctx, in, tocFile) p.androidMkSuffix = p.NameSuffix() Loading