Commit graph

1110 commits

Author SHA1 Message Date
Ivan Lozano
6d9e712858 Amend list of required Rust stdlib libraries.
Add libtest to our list of stdlib libraries, and remove some others that
are only used when generating proc_macros (which aren't dynamic).

Bug: 141207434
Test: m -j crosvm.experimental
Change-Id: I39cb030940adf1993e861d0142378eeea8b1ff5e
2019-09-20 10:59:56 -07:00
Colin Cross
3b19f5d71d Remove old-style support for translated second architectures
Translated second architectures now go in NativeBridgeArch instead
of DeviceSecondaryArch.

This reapplies I568046330abc002d4eed582cb999b62a5eaba790 with
ctx.Config().HasMulitlibConflict() added to fix the NDK build,
which has arm64, arm, x86_64, and x86 architectures enabled.

Test: m checkbuild
Test: OUT_DIR=out_ndk build/soong/scripts/build-ndk-prebuilts.sh
Test: no change to build.ninja or Android-aosp_cf_x86_phone.mk
Change-Id: Iadcafbd64bfb9579ae7c86914927c43a062b0c8e
2019-09-19 12:54:32 -07:00
Ivan Lozano
e169ad70a5 Add OWNERS for Rust whitelist.
Splits out the Rust paths whitelist into a separate file
under config/ so that OWNERS can be defined for it.

Bug: 141207129
Test: m -j crosvm.experimental
Change-Id: I5effa6783e5c47560b4b1eae12ad0eb9e9ba96fe
2019-09-18 12:46:28 -07:00
Ivan Lozano
70e0a07b99 Check Rust dep is a Module before checking target.
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
2019-09-13 14:43:57 -07:00
Ivan Lozano
06b9611da4 Merge "Move splitFileExt to the android package." 2019-09-10 19:38:20 +00:00
Ivan Lozano
022a73b9ad Move splitFileExt to the android package.
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
2019-09-09 20:29:31 -07:00
Matthew Maurer
43f697ec28 Update to Rust 1.37.0
Test: m crosvm.experimental
Bug: 140573584
Change-Id: I52d33b1ed4610536c89471e2052dea07b1b4ff8f
2019-09-09 16:17:33 -07:00
Ivan Lozano
de25291b6e Disable unsupported Rust targets.
Explicitly disable targets requiring unsupported toolchains when
processing Rust modules.

Bug: 140640858
Test: Darwin builds no longer breaking.
Change-Id: I8c60a2829508ae6de16bf347060818ca5c04f65e
2019-09-06 16:06:21 -07:00
Ivan Lozano
c0083614f6 Do not run Soong tests for Rust on non-Linux hosts.
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
2019-09-03 13:57:36 -07:00
Ivan Lozano
ffee334706 Add Rust support to Soong.
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
2019-08-28 14:11:07 -07:00