rust: Link libunwind into Rust static executables.
Rust static executables fail to build due to missing unwind symbols. Make sure we link libunwind when building these. Bug: 194386505 Test: rust_binary with static_executable: true builds. Change-Id: I74bab25e186e181bc1ac8fdd608687707c662e4d
This commit is contained in:
@@ -362,7 +362,9 @@ func bionicDeps(ctx DepsContext, deps Deps, static bool) Deps {
|
||||
} else {
|
||||
deps.SharedLibs = append(deps.SharedLibs, bionicLibs...)
|
||||
}
|
||||
|
||||
if ctx.RustModule().StaticExecutable() {
|
||||
deps.StaticLibs = append(deps.StaticLibs, "libunwind")
|
||||
}
|
||||
if libRuntimeBuiltins := config.BuiltinsRuntimeLibrary(ctx.toolchain()); libRuntimeBuiltins != "" {
|
||||
deps.StaticLibs = append(deps.StaticLibs, libRuntimeBuiltins)
|
||||
}
|
||||
|
Reference in New Issue
Block a user