The Target checks against the os type and arch type occur before we
determine a dependency is a rust.Module / cc.Module. This meant
rust_defaults would fail this check, preventing them from being used.
Bug: 140963307
Test: make a rust_binary_host using rust_defaults.
Change-Id: Ibf43635f14ad367b4ce8016a2196f8c645b36bfe
Both Rust and cc use this function, so move it over to android
package's util.go and export it.
Bug: 140734195
Test: m -j
Change-Id: Ibe8b7a94592e402468a027ad6027b187f29c8e07
The Rust toolchain only supports Linux hosts, so skip Rust tests
that depend on host toolchains when building on other platforms.
Test: Tests still run on Linux hosts
Bug: 140435149
Change-Id: I298b52589ab5c6a7ec3acc4db1111596cd995d76
Adds support to Soong for building rust modules. This currently only
supports x86_64 device and x86 linux host targets. The functionality
is sufficient to build crosvm.
Bug: 136189233
Test: Test module builds.
Test: crosvm builds.
Change-Id: I6ea04615834a6d673578ab10ea1a2eb04259fe09