From 4494685aec95d3ba4c5b376c49aa7ea977e08f97 Mon Sep 17 00:00:00 2001 From: Andrei Homescu Date: Fri, 7 Jul 2023 04:59:07 +0000 Subject: [PATCH] rust: Allow any host tool for custom_bindgen Switch custom_bindgen to use any HostToolProvider instead of just Rust modules, so any host binary can be used as the bindgen wrapper. Bug: 242243245 Test: presubmit Change-Id: I9ba189b2857b3049dcf14842c178ce5846bab2f7 --- rust/bindgen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/bindgen.go b/rust/bindgen.go index 96645b075..7dc1b4b10 100644 --- a/rust/bindgen.go +++ b/rust/bindgen.go @@ -247,7 +247,7 @@ func (b *bindgenDecorator) GenerateSource(ctx ModuleContext, deps PathDeps) andr var cmd, cmdDesc string if b.Properties.Custom_bindgen != "" { - cmd = ctx.GetDirectDepWithTag(b.Properties.Custom_bindgen, customBindgenDepTag).(*Module).HostToolPath().String() + cmd = ctx.GetDirectDepWithTag(b.Properties.Custom_bindgen, customBindgenDepTag).(android.HostToolProvider).HostToolPath().String() cmdDesc = b.Properties.Custom_bindgen } else { cmd = "$bindgenCmd"