From 2423717a0ff73c053e57308163b028ccb5c49d78 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Thu, 26 Oct 2017 09:46:21 -0700 Subject: [PATCH] Allow java_host_binary to be used with genrule. This is done by implementing the HostToolPath interface for java Binary objects. Currently, in order for a java_binary_host to be used in this way the java_host_binary must include: compile_multilib: "first" Otherwise the genrule is unable to find the correct variant. Test: ./build_test.bash Test: Manual Bug: 68397812 Change-Id: I6849488dc13fa8c383df69d00f62ad815ec17876 --- java/java.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/java.go b/java/java.go index f5035e7df..7ecf6720f 100644 --- a/java/java.go +++ b/java/java.go @@ -868,6 +868,10 @@ type Binary struct { binaryFile android.OutputPath } +func (j *Binary) HostToolPath() android.OptionalPath { + return android.OptionalPathForPath(j.binaryFile) +} + func (j *Binary) GenerateAndroidBuildActions(ctx android.ModuleContext) { j.Library.GenerateAndroidBuildActions(ctx)