Merge "Don't disable rust modules for linux_bionic"

This commit is contained in:
Treehugger Robot
2020-09-15 04:06:37 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 17 deletions

View File

@@ -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()
}

View File

@@ -560,21 +560,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
}