This whitespace in here causes rust to not be happy with the features
and throw warnings about a feature such as ' +sse3' being unsupported
when '+sse3' works just fine. Amazingly will cause rustc to abort when
you try to resolve the features to valid configs with the `--print` arg
to rustc.
The data layout changed for Rust 1.10. I noticed this because I got a
crash when using rust-native to build rust. The assertion that hit was
saying data layout mismatch and caused me to check the values in the
Rust sources.
Convert libstd-rs to not use the shared source setup and instead use
its own extracted directory. Include the version info in the bitbake
file so that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
Convert compiler-rt to not use the shared source setup and instead use
its own extracted directory. Include the version info in the bitbake
file so that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
Convert rust to not use the shared source setup and instead use its own
extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
Convert rust-llvm to not use the shared source setup and instead use its
own extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
This includes a basic test that attempts to compile the rustfmt crate.
Ensures that the workspace is always removed at the end of the build. It
utilizes available caches to speed up the build process and parallelizes
the build across i386, x86_64, arm32, and arm64 targets.
Signed-off-by: Derek Straka <derek@asterius.io>
This script can be extended in the future but it uses the containerize
script to ensure we run inside of a working build environment. This
script can be extended to build additional targets for testing.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
So that we can use the meta-rust layer as the final layer with some
configuration (for the purposes of testing). These configs should be not
used by actual end users.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
meta-rust has some layers it depends on and this script ensures it
fetches them down appropriately so that the poky directory can be used
as the source.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
The containerize script fetches down a Docker container and wires up the
current directory inside so that you can use a known good environment
for compiling Yocto that has all the dependencies.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
rustllvm ships some c++ code that we need to ensure is built with the
flags we want. Abuse an existing variable to make this happen.
This should fix our issues with the libstdc++ cxx11 abi (_GLIBCXX_USE_CXX11_ABI).
When rust's build system builds llvm itself, it uses these flags. Avoid
them interfering with other things by cleaning their usage out of the
platform cfg mk file.
The old cargo.bbclass had no users in meta-rust and had lots of
problems (not least of which was lots of duplicated lines with
cargo_util.bbclass). Delete the old cargo.bbclass and replace it
entirely wiht cargo_util
It's forbidden to access the network during the build phase in bitbake.
Since this version of cargo does not yet support source-replacement, we
must patch out the behavior instead.
OE-Core rev aeb653861a0ec39ea7a014c0622980edcbf653fa (between jethro and
krogoth) removed -e from the default flags in EXTRA_OEMAKE. Without
this, the makefile will default to gcc for CC.
The local registry is a more future-proof way to prevent cargo from
accessing the network during the build. Unfortunately, this is only
used during the build of cargo-native for now. The snapshot used while
building cargo-native supports using a local registry ("source
replacement") however the version of cargo supported by rust 1.10 does
not.
Until we can build a new-enough version of cargo that supports
source-replacement, we'll have to patch cargo directly to prevent it
from accessing the network. Once we do have a new-enough cargo, we can
stop populating cargo_home/registry and only create cargo_registry.