[Rust] cdylibs can now link against dylibs.
Bug: 144861059
Test: cd external/rust/crates; mma
Test: Manual verification through ldd that libstd is a dependency
Change-Id: I603cf519215317aa8c400cd0f6ebb1b58f5bcf15
diff --git a/rust/library.go b/rust/library.go
index 2e51266..ba5546c 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -311,8 +311,8 @@
func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps {
- // TODO(b/144861059) Remove if C libraries support dylib linkage in the future.
- if !ctx.Host() && (library.static() || library.shared()) {
+ // TODO(b/155498724) Remove if C static libraries no longer require libstd as an rlib dependency.
+ if !ctx.Host() && library.static() {
library.setNoStdlibs()
for _, stdlib := range config.Stdlibs {
deps.Rlibs = append(deps.Rlibs, stdlib+".static")