diff options
author | 2022-07-01 11:17:22 -0700 | |
---|---|---|
committer | 2022-07-01 18:30:17 +0000 | |
commit | a8941ec69fd680a80cc4ac026c831be6866f13c7 (patch) | |
tree | 50214506bafad0b500e237600848c88286a4f6ca | |
parent | f47fe386861cc88814d6eb7a87dae32ce860041b (diff) |
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
-rw-r--r-- | rust/compiler.go | 5 |
1 files 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) |