rust: Add vendor and recovery dylib support.
Adds dylib support for vendor and recovery images.
This changes the default linkage for vendor and recovery images to
dylib, which matches the platform default linkage. This also means that
by default, dylib-std variants are used for rlib dependencies.
Bug: 204303985
Test: Soong tests.
Test: m dist vendor-snapshot
Test: RECOVERY_SNAPSHOT_VERSION=current m dist recovery-snapshot
Change-Id: If84074b8615a70c45e7e162abeb853dc8c34d49a
diff --git a/cc/linkable.go b/cc/linkable.go
index 19e6501..2099399 100644
--- a/cc/linkable.go
+++ b/cc/linkable.go
@@ -87,6 +87,12 @@
// SnapshotStaticLibs returns the list of static library dependencies for this module.
SnapshotStaticLibs() []string
+ // SnapshotDylibs returns the list of dylib library dependencies for this module.
+ SnapshotDylibs() []string
+
+ // SnapshotRlibs returns the list of rlib library dependencies for this module.
+ SnapshotRlibs() []string
+
// IsSnapshotPrebuilt returns true if this module is a snapshot prebuilt.
IsSnapshotPrebuilt() bool
}
@@ -239,6 +245,9 @@
// Dylib returns true if this is an dylib module.
Dylib() bool
+ // RlibStd returns true if this is an rlib which links against an rlib libstd.
+ RlibStd() bool
+
// Static returns true if this is a static library module.
Static() bool