Remove support for gnustl.

Test: make checkbuild
Bug: None
Change-Id: Ifa457e9907e20bafa2885fbd6935d43b7f22aaaf
diff --git a/cc/library.go b/cc/library.go
index 9bd12a9..d0a580c 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -579,7 +579,7 @@
 
 	// TODO(danalbert): Clean this up when soong supports prebuilts.
 	if strings.HasPrefix(ctx.selectedStl(), "ndk_libc++") {
-		libDir := getNdkStlLibDir(ctx, flags.Toolchain, "libc++")
+		libDir := getNdkStlLibDir(ctx, "libc++")
 
 		if strings.HasSuffix(ctx.selectedStl(), "_shared") {
 			deps.StaticLibs = append(deps.StaticLibs,
diff --git a/cc/ndk_prebuilt.go b/cc/ndk_prebuilt.go
index 69e07b9..de1fa46 100644
--- a/cc/ndk_prebuilt.go
+++ b/cc/ndk_prebuilt.go
@@ -163,16 +163,13 @@
 	return module.Init()
 }
 
-func getNdkStlLibDir(ctx android.ModuleContext, toolchain config.Toolchain, stl string) android.SourcePath {
-	gccVersion := toolchain.GccVersion()
+func getNdkStlLibDir(ctx android.ModuleContext, stl string) android.SourcePath {
 	var libDir string
 	switch stl {
 	case "libstlport":
 		libDir = "cxx-stl/stlport/libs"
 	case "libc++":
 		libDir = "cxx-stl/llvm-libc++/libs"
-	case "libgnustl":
-		libDir = fmt.Sprintf("cxx-stl/gnu-libstdc++/%s/libs", gccVersion)
 	}
 
 	if libDir != "" {
@@ -201,6 +198,6 @@
 
 	stlName := strings.TrimSuffix(libName, "_shared")
 	stlName = strings.TrimSuffix(stlName, "_static")
-	libDir := getNdkStlLibDir(ctx, flags.Toolchain, stlName)
+	libDir := getNdkStlLibDir(ctx, stlName)
 	return libDir.Join(ctx, libName+libExt)
 }
diff --git a/cc/stl.go b/cc/stl.go
index 338db84..cafb26d 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -26,8 +26,6 @@
 		return "libc++"
 	case "ndk_libstlport_shared", "ndk_libstlport_static":
 		return "stlport"
-	case "ndk_libgnustl_static":
-		return "gnustl"
 	case "ndk_system":
 		return "system"
 	case "":
@@ -66,8 +64,7 @@
 			case "":
 				return "ndk_system"
 			case "c++_shared", "c++_static",
-				"stlport_shared", "stlport_static",
-				"gnustl_static":
+				"stlport_shared", "stlport_static":
 				return "ndk_lib" + s
 			case "libc++":
 				return "ndk_libc++_shared"
@@ -137,7 +134,7 @@
 		deps.SharedLibs = append([]string{"libstdc++"}, deps.SharedLibs...)
 	case "ndk_libc++_shared", "ndk_libstlport_shared":
 		deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl)
-	case "ndk_libc++_static", "ndk_libstlport_static", "ndk_libgnustl_static":
+	case "ndk_libc++_static", "ndk_libstlport_static":
 		deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl)
 	default:
 		panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl))
@@ -171,7 +168,7 @@
 	case "ndk_libc++_shared", "ndk_libc++_static":
 		// TODO(danalbert): This really shouldn't be here...
 		flags.CppFlags = append(flags.CppFlags, "-std=c++11")
-	case "ndk_libstlport_shared", "ndk_libstlport_static", "ndk_libgnustl_static":
+	case "ndk_libstlport_shared", "ndk_libstlport_static":
 		// Nothing
 	case "":
 		// None or error.
diff --git a/cc/test.go b/cc/test.go
index 7b9dcb9..2fb3a35 100644
--- a/cc/test.go
+++ b/cc/test.go
@@ -161,8 +161,6 @@
 			switch ctx.selectedStl() {
 			case "ndk_libc++_shared", "ndk_libc++_static":
 				deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_libcxx", "libgtest_ndk_libcxx")
-			case "ndk_libgnustl_static":
-				deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_gnustl", "libgtest_ndk_gnustl")
 			default:
 				deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk", "libgtest_ndk")
 			}