Commit Graph

164 Commits

Author SHA1 Message Date
Cody Schafer
805503686f Merge pull request #289 from floion/correct_license_file_assignment
rust-llvm: Use early variable assignment for the license checksum in …
2021-02-07 00:30:47 -05:00
Dan Callaghan
b7eacc0996 libstd-rs: embed bitcode for LTO
Fixes #294.
2021-02-05 11:41:47 +10:00
Florin Sarbu
5dda6c427a rust-llvm: Use early variable assignment for the license checksum in rust-llvm.inc
Because rust-llvm-ncsa.inc requires rust-llvm.inc we do not want that
the latter overrides the license checksum set in the former.

Signed-off-by: Florin Sarbu <florin@balena.io>
2021-01-28 10:36:54 +01:00
Khem Raj
47de35e153 libstd-rs: Remove libunwind on riscv
riscv port of libunwind is not available yet

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-12 00:32:38 -08:00
Khem Raj
e2979482dc rust: Add riscv32/riscv64 support
Set the cpu, features, and abi correctly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-12 00:31:16 -08:00
Khem Raj
a679b6f4c2 rust: Build rust backend
In llvm11 we have both riscv32 or riscv64 backends so enable them

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-12 00:30:18 -08:00
Khem Raj
a59ddd90d2 rust: Correct the data layout for riscv32
This now matches with llvm target backend in llvm 11

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-01-09 12:53:13 -08:00
Johan Anderholm
cb4f8294d4 Use proper llvm-target for armv7
arm-unknown-linux-gnueabihf was incorrectly used as llvm-target instead
of armv7-unknown-linux-gnueabihf when building for some Cortex A SoCs.
This may cause segfaults in non trivial rust applications on ARMv7
when e.g. +a7 is passed to LLVM. It seems to differ between different
versions of the compiler and LLVM versions.
2021-01-08 10:37:34 +01:00
Dan Callaghan
4b151fa804 add rust 1.47.0 2020-12-18 21:05:13 +10:00
Dan Callaghan
8cfc3c9826 clean up some common definitions across rust versions
These bits and pieces had evidently been copy-pasted forward into each
new recipe version, but now they are all identical and can be tidied up.
2020-12-18 21:05:06 +10:00
Khem Raj
2822b50c04 layer.conf: Add gatesgarth to LAYERSERIES_COMPAT
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-10-15 09:28:23 -07:00
Steven Walter
b7f9c1d0d7 Add rust 1.46.0 2020-08-31 14:47:11 -04:00
Martin Jansa
647b976da2 rust: use PARALLEL_MAKE instead of BB_NUMBER_THREADS
* BB_NUMBER_THREADS is number of bitbake tasks running in
  parallel, not parallelization inside individual tasks
* use oe.utils.parallel_make_argument to make sure it
  works even when people add e.g. "-l 10" in PARALLEL_MAKE
* with the recent improvements for rust-native build time, I wanted
  to rerun some build time tests from
  https://github.com/shr-project/test-oe-build-time
  here are the results on AMD Threadripper 3970x with 128GB ram:

  BB is BB_NUMBER_THREADS
  PM is PARALLEL_MAKE

  TIME   BB        PM   Description
  20:50   *         *   zeus based build with 1.37 rust (BB/PM has no impact)
  14:50   8  32,48,64   dunfell, 1.43 as in d2ff87ca55 (PM has no impact, because bootstrap uses BB)
   9:50   8  32,48,64   dunfell, 1.43 with this patch applied, it doesn't get faster after some threashold of PM
  13:32   8        64   dunfell, 1.43 with this patch applied and "rust.inc: cut build time in half" (afcb58e5b9) reverted
  13:30   8        64   dunfell, 1.43 with "rust.inc: cut build time in half" (afcb58e5b9) as well as "rust.inc: run bootstrap.py in parallel" (40a6bd8a8d) reverted to see if 1.43 builds faster without any meta-rust improvements compared to 1.37
  94:47   1        64   dunfell, 1.43 as in d2ff87ca55 (either something went wrong or explicit "-j 1" disables some parallelism done by default already
  13:40   *         *   zeus based build with 1.39 rust (BB/PM has no impact)
  10:50   8        64   zeus based build with 1.39 rust as proposed in jansa/new-zeus-branch
  80:51   8         1   zeus based build with 1.39 rust as proposed in jansa/new-zeus-branch with "-j 1" PARALLEL_MAKE

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2020-05-28 18:36:04 +02:00
Tyler Hall
8d3f79f217 rust.inc: whitelist BB_NUMBER_THREADS in do_compile
d55cce6b8b6b510bf4905f19b949f7995af57a4d added a use of
BB_NUMBER_THREADS which is not whitelisted in Poky. This caused machines
with a different number of CPUs to have different sstate for
rust-native.
2020-05-18 19:10:04 -04:00
Alistair Francis
2c7321dac6 Bump to Rust version 1.43
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2020-05-13 22:52:39 -07:00
Steven Walter
afcb58e5b9 rust.inc: cut build time in half
Don't tar everything up just to untar it again.  This literally takes
longer than actually building the rust compiler
2020-05-11 22:18:35 -04:00
Steven Walter
40a6bd8a8d rust.inc: run bootstrap.py in parallel
Allow bootstrap.py to use as many cores as bitbake normally uses
2020-05-11 22:18:35 -04:00
Steven Walter
c023edd985 rust.inc: make max-atomic-width an integer
As a string this was actually being ignored.  It mostly didn't matter
because max-atomic-width falls back to target-pointer-size, and they are
usually the same.  However, at least on i586, 64-bit atomics are
supported with a 32-bit pointer size.
2020-05-11 22:18:35 -04:00
Steven Walter
3b783652cc rust-native shouldn't depend on TARGET variables
The whole point of rust-native is that it should be common for all
targets.  If we reference TARGET variables during the build of
rust-native, then bitbake will build a different version for different
TARGETS.
2020-05-11 16:26:48 -04:00
Colin Finck
5c7f51b6ad Update to Rust 1.41.0 2020-02-10 11:17:51 +01:00
Colin Finck
e5c2a4085f Update to Rust and Cargo 1.40.0. 2020-01-06 10:03:13 +01:00
Alistair Francis
72aa4ef3ab rust: Use Python3 native for build
Use Python3 as the native Python instead of Python2.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-26 18:46:53 -08:00
Steven Walter
0f950f5e33 Merge pull request #255 from rettichschnidi/update-to-rust-1.39.0
Update to Rust 1.39.0
2019-12-15 18:23:50 -05:00
Zubair Lutfullah Kakakhel
186ec59085 rust: Improve TUNE_FEATURE parsing
Since ac83d22eb5

The armvX arch definition is not present in TUNE_FEATURES but is now in
MACHINEOVERRIDES. Improve parsing so that MACHINEOVERRIDES is also checked.

Fixes #240

Tested on raspberrypi3 with balenaOS which uses rust.

Signed-off-by: Zubair Lutfullah Kakakhel <zubair@balena.io>
2019-11-12 10:39:41 +00:00
Reto Schneider
71895ec5a4 Update to Rust and Cargo 1.39.0 2019-11-08 18:00:16 +01:00
Steven Walter
1cb2ad5543 Merge pull request #249 from ColinFinck/update-to-rust-1.37.0
Update to Rust and Cargo 1.37.0.
2019-08-31 13:58:45 -04:00
Colin Finck
afccedc43c Update to Rust and Cargo 1.37.0. 2019-08-29 11:31:28 +02:00
Alistair Francis
150b1591d6 rust-cross: Add riscv32 data layout information
This was generated with:
    clang --target=riscv32  -emit-llvm -S -x c /dev/null -o aaa |  cat aaa | grep "target datalayout"

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-08-23 15:57:29 -07:00
Johan Anderholm
2f323e1e9e Update to rust and cargo version 1.36.0 2019-08-02 09:35:31 +00:00
Alex Kiernan
2afc6ecef2 rust-llvm: Update LICENSE.TXT checksum
License-Update: copyright years refreshed
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2019-06-07 12:10:04 +01:00
Alex Kiernan
4ca5b781dc rust-source: Update COPYRIGHT checksum
License-Update: path names updated (src/llvm => src/llvm-project)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2019-06-07 12:10:04 +01:00
Takuro Ashie
03f492ab35 Update to rust version 1.34.2 2019-06-06 17:56:39 +09:00
Johan Anderholm
723e24bd9d Update to rust version 1.33.0 2019-03-02 07:28:09 +00:00
Johan Anderholm
fa0aebc070 Disable http2 in cargo
Since 1.31.0 cargo requires curl to support http2. Enabling http2 in
curl results in a dependency loop. This commit disables the use of
multiplexing and http2.
2019-02-15 12:34:37 +00:00
Johan Anderholm
b3d1b589ee Update to rust version 1.32.0 2019-02-14 15:29:17 +00:00
Johan Anderholm
cb383b0d90 Remove rust 1.27.1 2019-02-14 15:29:17 +00:00
Khem Raj
16d015a481 rust-llvm: Update the sysroot patch to latest from meta-clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-02-13 13:24:23 -08:00
Dan Dedrick
e7c10de555 rust: don't configure thumb if not in TUNE_FEATURES
ARM_INSTRUCTION_SET, and therefore ARM_THUMB_OPT also, expect to only be
used in conjunction with the thumb TUNE_FEATURES. So thumb-mode should only
be added if thumb is in TUNE_FEATURES and ARM_THUMB_OPT is thumb.

The commit https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/conf/machine/include/arm/arch-armv7a.inc?id=3e7d26e31a724009e69788460737e07163a14051
caused armv7a.inc to set ARM_INSTRUCTION_SET to thumb and the commit
message explicitly states that the change should have no effect unless
TUNE_FEATURES also includes thumb. This change to rust will allow that
assumption to continue to be true.
2019-01-14 15:58:54 -05:00
Johan Anderholm
496b75fa1f Update to rust version 1.31.1
Also make use of the sources vendored in the rustc package instead of
letting bitbake download the sources.
2019-01-03 17:31:46 +01:00
Khem Raj
bf01840f5b rust-cross: Add riscv64 data layout information
clang --target=riscv64  -emit-llvm -S -x c /dev/null -o aaa |  cat aaa | grep "target datalayout"

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-26 14:52:22 -08:00
Khem Raj
1b00814593 rust-cross: Add mips64 data layout llvm specifications
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-26 14:52:22 -08:00
Khem Raj
68d6bce609 rust-cross: Add ppc support
This ensures that rust-cross can be compiled for ppc arch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-26 14:52:18 -08:00
Khem Raj
665213a13d libstd-rs: Depend on libunwind on musl builds
musl builds need libunwind.a to be in sysroot for libstd-rs to build
unwinding support into it. This also means we need to compile libunwind
with --enable-static in oe-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-05 16:13:21 -08:00
Khem Raj
446d28d6e1 rust: Use llvm-rust-native and env variables to configure llvm-config
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-09 22:53:49 -08:00
Khem Raj
b15ba05ea8 rust-llvm: Make llvm-config cross compile friendly
Import patches from clang layer to ensure that llvm-config
can be provided configs from environment

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-09 22:52:05 -08:00
Khem Raj
e04d99bf38 rust-llvm: Fix build with OE-core master
Disable libxml2 explicitly
Disable building hosttools on target build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-02 15:05:17 -07:00
Steven Walter
5a9933dd46 rust-llvm: correctly disable assertions
We were already trying to disable assertions, but it wasn't working.
rust-llvm now configures assertions based on the CMAKE_BUILD_TYPE.
Setting that to "Release" causes assertions to be disabled, which is
what we want.
2018-08-08 12:37:17 -04:00
Johan Anderholm
bbf4f77f98 Bump to Rust 1.27.1 2018-07-18 08:15:34 +02:00
Steven Walter
8b471a1bdc libstd-rs: use a separate variable for --features
This will allow features to be easily modified through a bbappend file
in another layer.
2018-07-16 09:09:10 -04:00
Steven Walter
cef09a5551 libstd-rs: support debug builds 2018-07-12 11:03:16 -04:00