intentionally not forcing the usage of system jemalloc because it builds
with an unprefixed malloc and thus jemalloc's malloc can unintentionally
be used for linked C libraries
Some rust pacakges (e.g. eza and bat) do set strip = true
in their release profile which removes the debug symbols
before xbps-src can split them.
closes#47459
When using a build.rs script to dynamically generate bindgen bindings
at build-time, it will run on the host, and by default bindgen will
generate bindings for the host arch/libc instead of the target.
To generate the bindings on cross, we need to use BINDGEN_EXTRA_CLANG_ARGS
to specify the proper sysroot and include path for the target.
These arguments are not used for anything other than bindgen's clang
invocation.
The cc-rs crate will try to guess the host compiler and use default
flags these are not specifically set. The default behavior is wrong in
Void cross-compilation environments. Explicitly define HOST_CC=gcc and
use innocuous HOST_CFLAGS=-O2 just to thwart the bad defaults.
Co-authored-by: Érico Rolim <erico.erc@gmail.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
Closes: #28416.