rust: Add static binary support
Adds the "static_executable" property to rust_binary modules which
allows for building fully static executables. This only impacts bionic
targets.
Bug: 169434439
Test: rust_binary module with static_executable true builds, runs on
device.
Change-Id: I83c19fddd070859b7e56d248237cfd73e1768519
diff --git a/rust/library.go b/rust/library.go
index 7a77706..3bba089 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -396,7 +396,7 @@
deps = library.baseCompiler.compilerDeps(ctx, deps)
if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) {
- deps = bionicDeps(deps)
+ deps = bionicDeps(deps, false)
deps.CrtBegin = "crtbegin_so"
deps.CrtEnd = "crtend_so"
}