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

Commit 199c1885 authored by Matthew Maurer's avatar Matthew Maurer
Browse files

Revert^3 "rust: Only allow bindgen to produce `rlib`s."

9cc801ab

Change-Id: Ib59840b51b316c0ad03bc66565814dd96be0b072
parent 9cc801ab
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -299,15 +299,7 @@ func NewRustBindgen(hod android.HostOrDeviceSupported) (*Module, *bindgenDecorat
		ClangProperties:    cc.RustBindgenClangProperties{},
	}

	module := NewSourceProviderModule(hod, bindgen, false, true)

	android.AddLoadHook(module, func(ctx android.LoadHookContext) {
		type stub_props struct {
			Visibility []string
		}
		props := &stub_props{[]string{":__subpackages__"}}
		ctx.PrependProperties(props)
	})
	module := NewSourceProviderModule(hod, bindgen, false)

	return module, bindgen
}
+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ func NewRustProtobuf(hod android.HostOrDeviceSupported) (*Module, *protobufDecor
		Properties:         ProtobufProperties{},
	}

	module := NewSourceProviderModule(hod, protobuf, false, false)
	module := NewSourceProviderModule(hod, protobuf, false)

	return module, protobuf
}
+1 −4
Original line number Diff line number Diff line
@@ -65,12 +65,9 @@ func NewSourceProvider() *BaseSourceProvider {
	}
}

func NewSourceProviderModule(hod android.HostOrDeviceSupported, sourceProvider SourceProvider, enableLints bool, rlibOnly bool) *Module {
func NewSourceProviderModule(hod android.HostOrDeviceSupported, sourceProvider SourceProvider, enableLints bool) *Module {
	_, library := NewRustLibrary(hod)
	library.BuildOnlyRust()
	if rlibOnly {
		library.BuildOnlyRlib()
	}
	library.sourceProvider = sourceProvider

	module := newModule(hod, android.MultilibBoth)