]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rust-common.bbclass: use built-in rust targets for -native builds
authorAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 1 Nov 2022 09:17:09 +0000 (10:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 2 Nov 2022 09:20:53 +0000 (09:20 +0000)
commita918ea5645d8a67cedaf3ecf6c382520bbcad85b
treed21b5a686b060d9aa26483c575111c2b77c5022a
parentbb6ebb9956a42df3ed8681aec9aedf340b12f934
rust-common.bbclass: use built-in rust targets for -native builds

Rust targets have the form of 'arch-unknown-linux-gnu' while
oe's native targets are 'arch-linux-gnu', e.g. omit the vendor.

The effect this has on rust-native builds is that rust first builds
itself as stage0 for arch-unknown-linux-gnu, then builds itself
again for arch-unknown-linux-gnu, then finally uses the compiler
from second step to 'cross-compile' a compiler for 'arch-linux-gnu'.

This last step is really not necessary, and we could save 4 minutes
out of 12 if it is eliminated. Which is what this patch does
by setting the target directly to 'arch-unknown-linux-gnu'; rust's
build system then shortcuts the build process after the second step.

Given a working rust-native will be needed as early as possible in a
typical yocto build (e.g. when in a not too distant future making a
useful kernel will not be possible without rust), producing it faster
is important.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rust-common.bbclass