Commit graph

4 commits

Author SHA1 Message Date
Oliver Smith
d9830c6304
cross/crossdirect: partially use sccache for rust (MR 4310)
Wrap rustc commands with sccache when building native build scripts.
More interesting will be using sscache for compiling for the target
architecture, but sccache currently refuses to cache with --sysroot.
This can be optimized further later on, get some initial support for
sccache in here first.

While at it, tweak the -vV logic to also support -V, start using semver
with this and add myself as maintainer of the package.

[ci:skip-build]: already built successfully in CI
2023-09-05 08:45:41 +02:00
Affe Null
f0286576e7
cross/crossdirect: improve rust handling (MR 4234)
Add a cargo wrapper which appends a --target argument to the command
line. This makes cargo pass the --target argument to rustc for crates
being built for the target architecture, even if the target is the same
as the host. It will omit the --target argument for build scripts and
crates used in macros.

Check for this --target argument in the rustc wrapper and adjust the
library paths depending on its presence. The fallback that runs rustc
under qemu is no longer needed because macros are now built for the
native architecture and can be loaded into the native compiler without
any problems.

Also check if the arguments passed to rustc are "-vV". If this is the
case, we still need to fall back to the target rustc because the native
rustc will return the wrong architecture. If the wrong host architecture
is passed to a build script, it might try to look for a cross-compiler
or do something else that doesn't work.

[ci:skip-build]: already built successfully in CI
2023-07-24 08:32:10 +02:00
Luca Weiss
a81946781a
cross/crossdirect: fix rust breakage (!1139)
See:
* https://gitlab.alpinelinux.org/alpine/aports/issues/11349
* 7bb907ec23
2020-04-10 19:57:36 +02:00
Oliver Smith
f329c8f5ac
cross/crossdirect: support rust (!845)
Use the native rustc cross compiler where possible, and fall back to the
qemu rustc if necessary. This should improve speed and reliability.
Without this patch, building squeekbox 1.4.0 for aarch64 with the
pmbootstrap stack just hangs forever.

Related: pmbootstrap#1861
2020-01-14 02:45:18 +01:00