Switch the build process to using Rust's new build system called
rustbuild. At the same time stop using jemalloc on all platforms and
switch to the system allocator since that was simplier to do.
(cherry picked from commit a4fe235317)
We'll need the prior version of cargo to boot strap ourselves going
forward so include the version info so we can support multiple versions
in the tree.
(cherry picked from commit 1ff41650d5)
rustbuild is a cargo based way to build Rust but all of our helper bits
in cargo.bbclass would create a chicken/egg issue with dependencies
since we pull down pre-built binaries and use those for boot strapping.
(cherry picked from commit e31d252eb0)
If g++ is invoked when building native bits with cargo we need to
include CXXFLAGS.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
(cherry picked from commit 0cccf8b25c)
Generate the Cargo recipe with cargo-bitbake instead of having a
handcrafted recipe. This should make future version bumps easier.
Three known issues:
- license checksum of the Apache license is a generateme value
due to the license file having a difference name then what's in
Cargo.toml.
- branch= value was wrong for tags. Pointed to HEAD instead of the
branch that the underlying tag commit came from.
- Use https protocol when the repo is publicly accessible.
(cherry picked from commit 398fecb48c)
There was a bbnote that showed the path to the rustc and cargo binaries
being used but this was not necessarily correct since it didn't use the
exact variables used.
(cherry picked from commit c55fb403f8)
We shouldn't need to patch rustc to find the target but instead pass the
full path to the target spec. This should solve #138.
(cherry picked from commit 06a138a4a4)
Instead of using the configure script paired with make, use Cargo to
build Cargo. This moves us closer to being compatible with rustbuild.
(cherry picked from commit 3e0f03d12a)
For similar reasons to the C and linker wrappers, using rustbuild
requires a C++ wrapper to ensure that the right flags that Yocto needs
are passed to the underlying compiler.
(cherry picked from commit e814ede9d9)
Technically these dependencies change between versions. It just happens
that these two versions didn't change the dependencies but future
versions will so preemptively make the adjustment.
The path to the rust source changes from 1.15 so preemptively make
changes to prepare for that.
Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
The crate_hash flag is no longer accepted on rust 1.14. Additionally,
due to the use of wrapper scripts by cargo, we were no longer able to
link correctly due to some link flags getting dropped. Fix that as well
The way LLVM builds its native utilities is not safe (it runs a
recursive cmake in the same work directory as the main instance). To
prevent those instances from stepping on each other, we'll build the two
native utilities separately before starting the main build.
Fixes issue #143
This is a fast case if the slave has a local checkout available so that
it doesn't have to do a full clone. The check unfortunately didn't take
into account all cases and failed on the new slave.
This patches handle changing the directories that things are installed
in but appear to be unused. They were likely used before rust-cross was
split out to not install files.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Not sure what version this patch appears to have become unnecessary but
I verified it by checking the output in
build/tmp/sstate-control/manifest-x86_64-rust-native.populate_sysroot
and the installed files and their paths didn't change with and without
this patch.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Fix building a toolchain installer with bitbake
-c populate_sdk in packages compiler-rt,
compiler-rt-dev and compiler-rt-staticdev.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
(cherry picked from commit fcbebdf58f)