Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e08ead5 authored by Colin Cross's avatar Colin Cross Committed by Gerrit Code Review
Browse files

Merge changes from topic "protobuf-3.9.1"

* changes:
  Add suffix and target.vendor.suffix to shared libraries
  Make javanano a plugin
parents 84bd071c 0fd6a41a
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -88,6 +88,16 @@ type LibraryProperties struct {
	// set the name of the output
	Stem *string `android:"arch_variant"`

	// set suffix of the name of the output
	Suffix *string `android:"arch_variant"`

	Target struct {
		Vendor struct {
			// set suffix of the name of the output
			Suffix *string `android:"arch_variant"`
		}
	}

	// Names of modules to be overridden. Listed modules can only be other shared libraries
	// (in Make or Soong).
	// This does not completely prevent installation of the overridden libraries, but if both
@@ -549,7 +559,7 @@ type libraryInterface interface {
	androidMkWriteAdditionalDependenciesForSourceAbiDiff(w io.Writer)
}

func (library *libraryDecorator) getLibName(ctx ModuleContext) string {
func (library *libraryDecorator) getLibName(ctx BaseModuleContext) string {
	name := library.libName
	if name == "" {
		name = String(library.Properties.Stem)
@@ -558,6 +568,16 @@ func (library *libraryDecorator) getLibName(ctx ModuleContext) string {
		}
	}

	suffix := ""
	if ctx.useVndk() {
		suffix = String(library.Properties.Target.Vendor.Suffix)
	}
	if suffix == "" {
		suffix = String(library.Properties.Suffix)
	}

	name += suffix

	if ctx.isVndkExt() {
		name = ctx.getVndkExtendsModuleName()
	}
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ func (p *prebuiltLibraryLinker) link(ctx ModuleContext,

		if p.shared() {
			p.unstrippedOutputFile = in
			libName := ctx.baseModuleName() + flags.Toolchain.ShlibSuffix()
			libName := p.libraryDecorator.getLibName(ctx) + flags.Toolchain.ShlibSuffix()
			if p.needsStrip(ctx) {
				stripped := android.PathForModuleOut(ctx, "stripped", libName)
				p.stripExecutableOrSharedLib(ctx, in, stripped, builderFlags)
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ func protoFlags(ctx android.ModuleContext, j *CompilerProperties, p *android.Pro
			typeToPlugin = "javamicro"
		case "nano":
			flags.proto.OutTypeFlag = "--javanano_out"
			typeToPlugin = "javanano"
		case "lite":
			flags.proto.OutTypeFlag = "--java_out"
			flags.proto.OutParams = append(flags.proto.OutParams, "lite")