summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
authorMatthew Maurer <mmaurer@google.com>2019-10-31 10:44:40 -0700
committerMatthew Maurer <mmaurer@google.com>2019-11-13 17:46:19 -0800
commit99020b04fbf5ce97d9a7a5b56b44cadeeb34ca4c (patch)
treead88fefd6317657e8977d0fcc73313d4c590df14 /rust/binary.go
parent940ef19f77ed30fb1b3c850ef4f880420a6fb456 (diff)
Build Rust Device Sysroots in Soong
In order to ensure we are using current platform Bionic for any platform Rust binaries, we need to build the sysroot in Soong. This will also enable us too hook the "test" crate if necessary. While both a dynamic and static sysroot are available, on device only a dynamic sysroot will be injected. On host, we continue using the sysroot used to build the compiler as before. Bug: 139486496 Change-Id: I127377e5b056610ceb5015a34d266250320fbc31
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/rust/binary.go b/rust/binary.go
index 52f840e7a..3f43da076 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -16,7 +16,6 @@ package rust
import (
"android/soong/android"
- "android/soong/rust/config"
)
func init() {
@@ -89,12 +88,6 @@ func (binary *binaryDecorator) compilerFlags(ctx ModuleContext, flags Flags) Fla
func (binary *binaryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
deps = binary.baseCompiler.compilerDeps(ctx, deps)
- if binary.preferDynamic() || len(deps.Dylibs) > 0 {
- for _, stdlib := range config.Stdlibs {
- deps.Dylibs = append(deps.Dylibs, stdlib+"_"+ctx.toolchain().RustTriple())
- }
- }
-
if ctx.toolchain().Bionic() {
deps = binary.baseCompiler.bionicDeps(ctx, deps)
deps.CrtBegin = "crtbegin_dynamic"