Use platform libc++ for riscv64 sdk variants
There is no prebuilt libc++ for riscv64 provided by the NDK, build
it using the platform sources instead.
Test: lunch aosp_riscv64-userdebug && m -k
Change-Id: Ib9c99381e61331e10c136127a3f1b1626ce75ebe
diff --git a/cc/stl.go b/cc/stl.go
index 6353a4a..f1433ef 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -38,9 +38,9 @@
func getNdkStlFamilyAndLinkType(m LinkableInterface) (string, string) {
stl := m.SelectedStl()
switch stl {
- case "ndk_libc++_shared":
+ case "ndk_libc++_shared", "libc++":
return "libc++", "shared"
- case "ndk_libc++_static":
+ case "ndk_libc++_static", "libc++_static":
return "libc++", "static"
case "ndk_system":
return "system", "shared"
@@ -80,7 +80,8 @@
return ""
}
s = deduplicateStlInput(s)
- if ctx.useSdk() && ctx.Device() {
+ archHasNDKStl := ctx.Arch().ArchType != android.Riscv64
+ if ctx.useSdk() && ctx.Device() && archHasNDKStl {
switch s {
case "", "system":
return "ndk_system"