Switch platform EH unwinder to prebuilt LLVM libunwind
For the platform libc++ STL, remove the -Wl,--exclude-libs,libunwind_llvm.a argument, which is redundant with the same argument in deviceGlobalLdflags. Bug: http://b/153025717 Test: device boots Change-Id: Idd7791d52f74aab2d5f59419fb75f841fc29a2eb
This commit is contained in:
11
cc/stl.go
11
cc/stl.go
@@ -140,11 +140,7 @@ func needsLibAndroidSupport(ctx BaseModuleContext) bool {
|
||||
}
|
||||
|
||||
func staticUnwinder(ctx android.BaseModuleContext) string {
|
||||
if ctx.Arch().ArchType == android.Arm {
|
||||
return "libunwind_llvm"
|
||||
} else {
|
||||
return "libgcc_stripped"
|
||||
}
|
||||
return "libunwind"
|
||||
}
|
||||
|
||||
func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
@@ -192,6 +188,7 @@ func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
if needsLibAndroidSupport(ctx) {
|
||||
deps.StaticLibs = append(deps.StaticLibs, "ndk_libandroid_support")
|
||||
}
|
||||
// TODO: Switch the NDK over to the LLVM unwinder for non-arm32 architectures.
|
||||
if ctx.Arch().ArchType == android.Arm {
|
||||
deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind")
|
||||
} else {
|
||||
@@ -231,10 +228,6 @@ func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
// Use Win32 threads in libc++.
|
||||
"-D_LIBCPP_HAS_THREAD_API_WIN32")
|
||||
}
|
||||
} else {
|
||||
if ctx.Arch().ArchType == android.Arm {
|
||||
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--exclude-libs,libunwind_llvm.a")
|
||||
}
|
||||
}
|
||||
case "libstdc++":
|
||||
// Nothing
|
||||
|
Reference in New Issue
Block a user