cargo and rust tweaking
This commit is contained in:
@@ -36,6 +36,23 @@ ecosystem get their act together, you'll need to supply patches to the
|
||||
misbehaving packages. See `recipies/cargo/cargo_*.bb` for an example of how to
|
||||
do this.
|
||||
|
||||
## Cargo
|
||||
|
||||
Cargo may not work with the latest rust.
|
||||
You can either:
|
||||
|
||||
- use the system cargo:
|
||||
|
||||
CARGO_PROVIDED = "cargo-native"
|
||||
ASSUME_PROVIDED += "${CARGO_PROVIDED}"
|
||||
|
||||
- or have cargo use a rust snapshot
|
||||
|
||||
PACKAGECONFIG_append_pn-cargo-native = " rust-snapshot"
|
||||
|
||||
For now, we default to using the 'rust-snapshot' PACKAGECONFIG to avoid lots of
|
||||
failures.
|
||||
|
||||
## TODO
|
||||
|
||||
- Include downloaded stage0 snapshot in `SRC_URI`
|
||||
|
||||
@@ -7,8 +7,3 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
|
||||
BBFILE_COLLECTIONS += "rust-layer"
|
||||
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_rust-layer = "7"
|
||||
|
||||
# cargo generally doesn't work with the latest rust. Default to using the
|
||||
# system's own cargo for cargo-native.
|
||||
#CARGO_PROVIDED = "cargo-native"
|
||||
#ASSUME_PROVIDED += "${CARGO_PROVIDED}"
|
||||
|
||||
@@ -23,7 +23,7 @@ PV .= "+git${SRCPV}"
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${S}"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
# PACKAGECONFIG is set in .bb files
|
||||
PACKAGECONFIG[rust-snapshot] = "--local-rust-root=${B}/rustc"
|
||||
|
||||
do_configure () {
|
||||
@@ -50,10 +50,6 @@ do_configure () {
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
# env vars are used by gcc-rs
|
||||
# HOST is set once we have this cargo, but we need to manually
|
||||
# set it for the bootstrap.
|
||||
export HOST="${BUILD_SYS}"
|
||||
oe_cargo_fix_env
|
||||
oe_runmake ARGS="--verbose"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
SRCREV_cargo = "e6abfbb959b363248ee03c731a67d2897dd061ce"
|
||||
PACKAGECONFIG ??= "rust-snapshot"
|
||||
|
||||
require cargo.inc
|
||||
|
||||
SRC_URI += " \
|
||||
@@ -10,7 +12,10 @@ SRC_URI += " \
|
||||
file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \
|
||||
"
|
||||
|
||||
SRCREV_curl-rust = "6f4d66ed0bc5e71a0ea86a37f038f7c9f73dc3ae"
|
||||
# 0.1.4
|
||||
#SRCREV_curl-rust = "6f4d66ed0bc5e71a0ea86a37f038f7c9f73dc3ae"
|
||||
# 0.1.3
|
||||
SRCREV_curl-rust = "4517ee606c65bbe03e4ad4f661725eb80e667a69"
|
||||
SRCREV_ssh2-rs = "509a8459e466ffa4705a0c686b80ac80b499f5d5"
|
||||
SRCREV_FORMAT = "cargo_curl-rust_ssh2-rs"
|
||||
EXTRA_OECARGO_PATHS = "\
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
SRCREV = "71123902e17ad339649f33423995eac78da40e3c"
|
||||
# pre-ascii reform
|
||||
#SRCREV = "0201334439393bed205c1148bed425b80aab8c22"
|
||||
require rust-git.inc
|
||||
|
||||
SRC_URI_append = "\
|
||||
|
||||
Reference in New Issue
Block a user