From 12ee9cac911f331078495a747cd28bf1aa75ef04 Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Tue, 7 Apr 2020 13:19:44 -0400 Subject: [PATCH] Add crtbegin_so/crtend_so to Bionic Rust libraries. Bug: 153430438 Test: Example library no longer experiences linkage errors during build. Change-Id: I73870a68693415b37c9b7bf051b1879bcb8df0c6 --- rust/library.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/library.go b/rust/library.go index 0cf2dd045..bf863bb67 100644 --- a/rust/library.go +++ b/rust/library.go @@ -318,6 +318,8 @@ func (library *libraryDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps { if ctx.toolchain().Bionic() && (library.dylib() || library.shared()) { deps = library.baseCompiler.bionicDeps(ctx, deps) + deps.CrtBegin = "crtbegin_so" + deps.CrtEnd = "crtend_so" } return deps