Browse Source

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
Colin Cross 1 year ago
parent
commit
4c608f54b0
1 changed files with 4 additions and 3 deletions
  1. 4 3
      cc/stl.go

+ 4 - 3
cc/stl.go

@@ -38,9 +38,9 @@ func deduplicateStlInput(stl string) string {
 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 @@ func (stl *stl) begin(ctx BaseModuleContext) {
 			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"