Loading cc/androidmk.go +0 −4 Original line number Diff line number Diff line Loading @@ -560,10 +560,6 @@ func (c *snapshotLibraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entrie func (c *snapshotBinaryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) { entries.Class = "EXECUTABLES" entries.SubName = c.baseProperties.Androidmk_suffix entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { entries.AddStrings("LOCAL_MODULE_SYMLINKS", c.Properties.Symlinks...) }) } func (c *snapshotObjectLinker) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) { Loading cc/binary.go +10 −6 Original line number Diff line number Diff line Loading @@ -441,6 +441,16 @@ func (binary *binaryDecorator) link(ctx ModuleContext, // Need to determine symlinks early since some targets (ie APEX) need this // information but will not call 'install' binary.setSymlinkList(ctx) return ret } func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path { return binary.unstrippedOutputFile } func (binary *binaryDecorator) setSymlinkList(ctx ModuleContext) { for _, symlink := range binary.Properties.Symlinks { binary.symlinks = append(binary.symlinks, symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix()) Loading @@ -457,12 +467,6 @@ func (binary *binaryDecorator) link(ctx ModuleContext, binary.preferredArchSymlink = symlinkName } } return ret } func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path { return binary.unstrippedOutputFile } func (binary *binaryDecorator) symlinkList() []string { Loading cc/snapshot_prebuilt.go +3 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,9 @@ func (p *snapshotBinaryDecorator) link(ctx ModuleContext, flags Flags, deps Path Input: in, }) // binary snapshots need symlinking p.setSymlinkList(ctx) return outputFile } Loading cc/vendor_snapshot_test.go +16 −1 Original line number Diff line number Diff line Loading @@ -741,6 +741,7 @@ func TestVendorSnapshotUse(t *testing.T) { src: "bin", }, }, symlinks: ["binfoo", "binbar"], } vendor_snapshot_binary { Loading Loading @@ -920,7 +921,21 @@ func TestVendorSnapshotUse(t *testing.T) { ctx.ModuleForTests("libvendor_without_snapshot", sharedVariant).Output("libvendor_without_snapshot.so") // bin is installed by bin.vendor_binary.31.arm64 ctx.ModuleForTests("bin.vendor_binary.31.arm64", binaryVariant).Output("bin") bin64Module := ctx.ModuleForTests("bin.vendor_binary.31.arm64", binaryVariant) bin64Module.Output("bin") // also test symlinks bin64MkEntries := android.AndroidMkEntriesForTest(t, ctx, bin64Module.Module()) bin64KatiSymlinks := bin64MkEntries[0].EntryMap["LOCAL_SOONG_INSTALL_SYMLINKS"] // Either AndroidMk entries contain symlinks, or symlinks should be installed by Soong for _, symlink := range []string{"binfoo", "binbar"} { if inList(symlink, bin64KatiSymlinks) { continue } bin64Module.Output(symlink) } // bin32 is installed by bin32.vendor_binary.31.arm64 ctx.ModuleForTests("bin32.vendor_binary.31.arm64", binary32Variant).Output("bin32") Loading Loading
cc/androidmk.go +0 −4 Original line number Diff line number Diff line Loading @@ -560,10 +560,6 @@ func (c *snapshotLibraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entrie func (c *snapshotBinaryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) { entries.Class = "EXECUTABLES" entries.SubName = c.baseProperties.Androidmk_suffix entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) { entries.AddStrings("LOCAL_MODULE_SYMLINKS", c.Properties.Symlinks...) }) } func (c *snapshotObjectLinker) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) { Loading
cc/binary.go +10 −6 Original line number Diff line number Diff line Loading @@ -441,6 +441,16 @@ func (binary *binaryDecorator) link(ctx ModuleContext, // Need to determine symlinks early since some targets (ie APEX) need this // information but will not call 'install' binary.setSymlinkList(ctx) return ret } func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path { return binary.unstrippedOutputFile } func (binary *binaryDecorator) setSymlinkList(ctx ModuleContext) { for _, symlink := range binary.Properties.Symlinks { binary.symlinks = append(binary.symlinks, symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix()) Loading @@ -457,12 +467,6 @@ func (binary *binaryDecorator) link(ctx ModuleContext, binary.preferredArchSymlink = symlinkName } } return ret } func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path { return binary.unstrippedOutputFile } func (binary *binaryDecorator) symlinkList() []string { Loading
cc/snapshot_prebuilt.go +3 −0 Original line number Diff line number Diff line Loading @@ -680,6 +680,9 @@ func (p *snapshotBinaryDecorator) link(ctx ModuleContext, flags Flags, deps Path Input: in, }) // binary snapshots need symlinking p.setSymlinkList(ctx) return outputFile } Loading
cc/vendor_snapshot_test.go +16 −1 Original line number Diff line number Diff line Loading @@ -741,6 +741,7 @@ func TestVendorSnapshotUse(t *testing.T) { src: "bin", }, }, symlinks: ["binfoo", "binbar"], } vendor_snapshot_binary { Loading Loading @@ -920,7 +921,21 @@ func TestVendorSnapshotUse(t *testing.T) { ctx.ModuleForTests("libvendor_without_snapshot", sharedVariant).Output("libvendor_without_snapshot.so") // bin is installed by bin.vendor_binary.31.arm64 ctx.ModuleForTests("bin.vendor_binary.31.arm64", binaryVariant).Output("bin") bin64Module := ctx.ModuleForTests("bin.vendor_binary.31.arm64", binaryVariant) bin64Module.Output("bin") // also test symlinks bin64MkEntries := android.AndroidMkEntriesForTest(t, ctx, bin64Module.Module()) bin64KatiSymlinks := bin64MkEntries[0].EntryMap["LOCAL_SOONG_INSTALL_SYMLINKS"] // Either AndroidMk entries contain symlinks, or symlinks should be installed by Soong for _, symlink := range []string{"binfoo", "binbar"} { if inList(symlink, bin64KatiSymlinks) { continue } bin64Module.Output(symlink) } // bin32 is installed by bin32.vendor_binary.31.arm64 ctx.ModuleForTests("bin32.vendor_binary.31.arm64", binary32Variant).Output("bin32") Loading