aboutsummaryrefslogtreecommitdiffstats
path: root/rust/rust.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/rust.go b/rust/rust.go
index e2af6f03..e4f85f0f 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -705,13 +705,15 @@ func (mod *Module) InstallInData() bool {
func linkPathFromFilePath(filepath android.Path) string {
return strings.Split(filepath.String(), filepath.Base())[0]
}
+
func libNameFromFilePath(filepath android.Path) string {
- libName := strings.Split(filepath.Base(), filepath.Ext())[0]
+ libName := strings.TrimSuffix(filepath.Base(), filepath.Ext())
if strings.HasPrefix(libName, "lib") {
libName = libName[3:]
}
return libName
}
+
func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) {
ctx := &depsContext{
BottomUpMutatorContext: actx,