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

Commit 765fe7a5 authored by Ivan Lozano's avatar Ivan Lozano Committed by Gerrit Code Review
Browse files

Merge changes Ia7deed13,I7378a46f

* changes:
  Add support for Rust C libraries.
  Add a common interface for cc linkable libraries.
parents ec90e44c 52767be3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ bootstrap_go_package {
        "cc/check.go",
        "cc/coverage.go",
        "cc/gen.go",
        "cc/linkable.go",
        "cc/lto.go",
        "cc/makevars.go",
        "cc/pgo.go",
+5 −5
Original line number Diff line number Diff line
@@ -36,10 +36,10 @@ type AndroidMkContext interface {
	Arch() android.Arch
	Os() android.OsType
	Host() bool
	useVndk() bool
	UseVndk() bool
	vndkVersion() string
	static() bool
	inRecovery() bool
	InRecovery() bool
}

type subAndroidMkProvider interface {
@@ -89,9 +89,9 @@ func (c *Module) AndroidMk() android.AndroidMkData {
					fmt.Fprintln(w, "LOCAL_WHOLE_STATIC_LIBRARIES := "+strings.Join(c.Properties.AndroidMkWholeStaticLibs, " "))
				}
				fmt.Fprintln(w, "LOCAL_SOONG_LINK_TYPE :=", c.makeLinkType)
				if c.useVndk() {
				if c.UseVndk() {
					fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
					if c.isVndk() && !c.static() {
					if c.IsVndk() && !c.static() {
						fmt.Fprintln(w, "LOCAL_SOONG_VNDK_VERSION := "+c.vndkVersion())
					}
				}
@@ -224,7 +224,7 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An
		})
	}
	if len(library.Properties.Stubs.Versions) > 0 &&
		android.DirectlyInAnyApex(ctx, ctx.Name()) && !ctx.inRecovery() && !ctx.useVndk() &&
		android.DirectlyInAnyApex(ctx, ctx.Name()) && !ctx.InRecovery() && !ctx.UseVndk() &&
		!ctx.static() {
		if !library.buildStubs() {
			ret.SubName = ".bootstrap"
+390 −195

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ func checkVndkModule(t *testing.T, ctx *android.TestContext, name, subDir string
	t.Helper()

	mod := ctx.ModuleForTests(name, vendorVariant).Module().(*Module)
	if !mod.hasVendorVariant() {
	if !mod.HasVendorVariant() {
		t.Errorf("%q must have vendor variant", name)
	}

@@ -230,8 +230,8 @@ func checkVndkModule(t *testing.T, ctx *android.TestContext, name, subDir string
	if mod.vndkdep == nil {
		t.Fatalf("%q must have `vndkdep`", name)
	}
	if !mod.isVndk() {
		t.Errorf("%q isVndk() must equal to true", name)
	if !mod.IsVndk() {
		t.Errorf("%q IsVndk() must equal to true", name)
	}
	if mod.isVndkSp() != isVndkSp {
		t.Errorf("%q isVndkSp() must equal to %t", name, isVndkSp)
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {

		// Discard vendor-NDK-linked modules, they're duplicates of fuzz targets
		// we're going to package anyway.
		if ccModule.useVndk() || !ccModule.Enabled() {
		if ccModule.UseVndk() || !ccModule.Enabled() {
			return
		}

Loading