Add a rust_fuzz module which builds a libfuzzer binary that enabes
asan+sancov. This relies on the libfuzzer-sys crate.
Bug: 147140513
Test: Local rust_fuzz example builds, fuzzes with asan+sancov.
Change-Id: I57db3b8d25869791824ccfab768d13b0bb9d42fa
In the previous mode, building Rust code using certain intrinsics would
fail on arm32 since our runtime is armv7, but our codegen was arm.
Test: cd external/rust; mma
Bug: 169245712
Change-Id: Ie800486b39325486f5ff319e46632df2a6987391
Rust is not passing the sysroot flag to Clang when invoking it as the
linker. This means files from the host may leak in, and host targets
may fail if sysroot files are not available from the host.
This patch prepends the lld flags from cc into rust linkargs. This
pulls in the sysroots flag, and also ensures that we remain in sync
with linkage flags used in cc.
The '-Wl,--no-undefined-version' from cc is overridden to avoid
missing version assignment errors for rust's generated alloc
functions.
Bug: 167690054
Test: cd external/rust; mma
Test: strace -f -e %file <host libstd.dylib.so build command> pulls
from correct sysroots.
Change-Id: Ic40597f546f3b112012155614056afed487c6ca1
CC libraries which depend on Rust libraries get missing dependency
errors when building 32-bit variants dependent on Rust modules which
don't explicitly have "multilib: both" declared.
Because CC libraries use MultilibBoth by default, Rust should do the
same.
This also fixes a bug where the ARM32 toolchain incorrectly embedded
toolchain64Bit instead of toolchain32Bit.
Bug: 154730212
Test: Rust libraries provide both variants by default.
Change-Id: Ia545fe069d3c6b77c3d18f4f10267e2c72ee0bab