Fix proc_macro dependency handling.

Currently proc_macros don't pull in the correct arch dependencies when
the host arch differs from the target arch.

This fixes how proc_macro dependencies are handled by defining them as
always being host-only and including them as dependencies for
device-modules by using AddFarVariationDependencies.

Bug: 141491501
Test: Example device rust module builds with proc_macro dependency.
Change-Id: Ic037dc406ce90526f8b68c92fffc0d93a498a4ff
This commit is contained in:
Ivan Lozano
2019-09-23 10:10:40 -07:00
parent 1a4d45b2f8
commit 5ca5ef6788
5 changed files with 10 additions and 30 deletions

View File

@@ -64,7 +64,6 @@ func TestEnforceSingleSourceFile(t *testing.T) {
rust_proc_macro {
name: "foo-bar-proc-macro",
srcs: ["foo.rs", "src/bar.rs"],
host_supported: true,
}`)
// Test prebuilts