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>
The oe-core/poky change 'base.bbclass wipe ${S} before unpacking
source' (poky: a56fb90dc3805494eeaf04c60538425e8d52efc5, oe-core:
eccae514b71394ffaed8fc45dea7942152a334a1) wipes ${S} in do_unpack prior
to unpacking. This breaks our shared source as we set ${S} to the shared
location, and don't actually unpack anything (the result is we try to
build rustc without any source code, which fails predictably)
Avoid this by clearing do_unpack[cleandirs].
At the same time take pieces of gcc-shared-source.inc and note how & why
we differ from how gcc operates.
This is a bit of a hack, and only happens to work because we know the
exact method that do_unpack uses to clear ${S}, and using python()
happens to get called at the "right time".
RUSTFLAGS is used by Cargo and always passed to the compiler. Put our
non-standard crate_hash argument there because it is required for
reproducible builds.
Add the rpath option to avoid having to patch Cargo.toml for this and
remove the function that does so.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
rust-bin.bbclass now only contains what is necessary to build crates
using the rust compiler directly and rust.bbclass contains information
shared between rust-bin and cargo.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
If this dependency is missing its possible that openssl won't be built
before libgit2 is built and then we won't have git support over SSL
which leaves out a lot of git repos.
The August snapshot is no longer new enough for rust 1.7.0. Without the
update rust's build process still tries to download its own snapshot,
which rather defeats the point of this.