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

Commit b5d2dd21 authored by Jiyong Park's avatar Jiyong Park
Browse files

Don't disable rust modules for linux_bionic

With If4300583edfb6d75bd4d984b38f73b6a406b4447, linux_bionic supports
arm64 and rust toolchain was configured to support the new target.
However, rust module types still have been disabled for linux_bionic
targets which forces many rust modules to be annotated with
target.linux_bionic_arm64.enabled: true, which will be very cumbersome.
Therefore, stop disabling the rust modules for linux_bionic.

Bug: 159685774
Test: HOST_CROSS_OS=linux_bionic m nothing
Change-Id: I68b97a43e8252fb82da6e87b3481fa237e1f2691
parent 4afa2e26
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -216,8 +216,8 @@ func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {

	if !Bool(compiler.Properties.No_stdlibs) {
		for _, stdlib := range config.Stdlibs {
			// If we're building for the primary host target, use the compiler's stdlibs
			if ctx.Host() && ctx.TargetPrimary() {
			// If we're building for the primary arch of the build host, use the compiler's stdlibs
			if ctx.Target().Os == android.BuildOs && ctx.TargetPrimary() {
				stdlib = stdlib + "_" + ctx.toolchain().RustTriple()
			}

+0 −15
Original line number Diff line number Diff line
@@ -559,21 +559,6 @@ func (mod *Module) Init() android.Module {
	android.InitAndroidArchModule(mod, mod.hod, mod.multilib)

	android.InitDefaultableModule(mod)

	// Explicitly disable unsupported targets.
	android.AddLoadHook(mod, func(ctx android.LoadHookContext) {
		disableTargets := struct {
			Target struct {
				Linux_bionic struct {
					Enabled *bool
				}
			}
		}{}
		disableTargets.Target.Linux_bionic.Enabled = proptools.BoolPtr(false)

		ctx.AppendProperties(&disableTargets)
	})

	return mod
}