summaryrefslogtreecommitdiff
path: root/rust/binary.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/binary.go')
-rw-r--r--rust/binary.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/binary.go b/rust/binary.go
index 996951366..cba29a023 100644
--- a/rust/binary.go
+++ b/rust/binary.go
@@ -134,6 +134,9 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path
ret := buildOutput{outputFile: outputFile}
crateRootPath := crateRootPath(ctx, binary)
+ // Ensure link dirs are not duplicated
+ deps.linkDirs = android.FirstUniqueStrings(deps.linkDirs)
+
flags.RustFlags = append(flags.RustFlags, deps.depFlags...)
flags.LinkFlags = append(flags.LinkFlags, deps.depLinkFlags...)
flags.LinkFlags = append(flags.LinkFlags, deps.linkObjects...)