From a8941ec69fd680a80cc4ac026c831be6866f13c7 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 1 Jul 2022 11:17:22 -0700 Subject: [PATCH] Don't use prebuilt rust stdlibs for linux bionic Linux bionic doesn't have rust stdlib prebuilts, don't use the prebuilts when it is configured as the host os. Bug: 216192129 Test: builds Change-Id: I03425dee4b2e3659bf90c0a0c808cc286daa4b7f --- rust/compiler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/compiler.go b/rust/compiler.go index 365f1e0b5..bf6a48844 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -371,8 +371,9 @@ 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 build host, use the prebuilt stdlibs - if ctx.Host() && !ctx.Target().HostCross { + // If we're building for the build host, use the prebuilt stdlibs, unless the host + // is linux_bionic which doesn't have prebuilts. + if ctx.Host() && !ctx.Target().HostCross && ctx.Target().Os != android.LinuxBionic { stdlib = "prebuilt_" + stdlib } deps.Stdlibs = append(deps.Stdlibs, stdlib)