Use old unwinder for R cc modules

Modules linking against VNDK R have been using libgcc_stripped and
libunwind_llvm as their unwinder. This change uses those old unwinder
libraries if current module's VNDK version is R.

Bug: 178470649
Test: soong test
Change-Id: I86d0600b2fb09cd9828c0a5b1157558711b0ec86
This commit is contained in:
Inseob Kim
2021-04-08 19:28:28 +09:00
parent 253f521dbc
commit d4c9f55468
2 changed files with 98 additions and 41 deletions

View File

@@ -140,6 +140,17 @@ func needsLibAndroidSupport(ctx BaseModuleContext) bool {
}
func staticUnwinder(ctx android.BaseModuleContext) string {
vndkVersion := ctx.Module().(*Module).VndkVersion()
// Modules using R vndk use different unwinder
if vndkVersion == "30" {
if ctx.Arch().ArchType == android.Arm {
return "libunwind_llvm"
} else {
return "libgcc_stripped"
}
}
return "libunwind"
}