summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/rust/binary.go b/rust/binary.go
index 2c3f54835..7c18730c6 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -31,6 +31,11 @@ type BinaryCompilerProperties struct {
Static_executable *bool `android:"arch_variant"`
}
+type binaryInterface interface {
+ binary() bool
+ staticallyLinked() bool
+}
+
type binaryDecorator struct {
*baseCompiler
stripper Stripper
@@ -155,3 +160,11 @@ func (binary *binaryDecorator) stdLinkage(ctx *depsContext) RustLinkage {
}
return binary.baseCompiler.stdLinkage(ctx)
}
+
+func (binary *binaryDecorator) binary() bool {
+ return true
+}
+
+func (binary *binaryDecorator) staticallyLinked() bool {
+ return Bool(binary.Properties.Static_executable)
+}