From 2093af23c06429f5dd22dbae5d47ef800a9fb379 Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Tue, 25 Aug 2020 12:48:19 -0400 Subject: [rust] Pass cc dependencies as linker flags. In order to support cc dependencies which do not start with the 'lib' prefix, we can't pass them through the -l flag. Instead, we can pass them directly to linker flags. Bug: 166151658 Test: cd external/rust/; mma Test: cd external/crosvm/; mma Test: Test linking to a cc dep that does not begin with 'lib' Change-Id: I5acbf3d3405e66446f3eae600b35683c4eb3d8a5 --- rust/binary.go | 1 + 1 file changed, 1 insertion(+) (limited to 'rust/binary.go') diff --git a/rust/binary.go b/rust/binary.go index 1a82c9208..8490e93a7 100644 --- a/rust/binary.go +++ b/rust/binary.go @@ -112,6 +112,7 @@ func (binary *binaryDecorator) compile(ctx ModuleContext, flags Flags, deps Path binary.unstrippedOutputFile = outputFile flags.RustFlags = append(flags.RustFlags, deps.depFlags...) + flags.LinkFlags = append(flags.LinkFlags, deps.linkObjects...) outputs := TransformSrcToBinary(ctx, srcPath, deps, flags, outputFile, deps.linkDirs) binary.coverageFile = outputs.coverageFile -- cgit v1.2.3-59-g8ed1b