Revert "Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules"

This reverts commit e2874cd99d574de49d34f8987a0af64331c7ad6e.

Reason for revert: broke mac builds
Bug: 113936524

Change-Id: Id0311d6b202b18e80953da632133548d56ed851a
diff --git a/cc/stl.go b/cc/stl.go
index 5c69948..6f63835 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -19,24 +19,18 @@
 	"fmt"
 )
 
-func getNdkStlFamily(m *Module) string {
-	family, _ := getNdkStlFamilyAndLinkType(m)
-	return family
-}
-
-func getNdkStlFamilyAndLinkType(m *Module) (string, string) {
+func getNdkStlFamily(ctx android.ModuleContext, m *Module) string {
 	stl := m.stl.Properties.SelectedStl
 	switch stl {
-	case "ndk_libc++_shared":
-		return "libc++", "shared"
-	case "ndk_libc++_static":
-		return "libc++", "static"
+	case "ndk_libc++_shared", "ndk_libc++_static":
+		return "libc++"
 	case "ndk_system":
-		return "system", "shared"
+		return "system"
 	case "":
-		return "none", "none"
+		return "none"
 	default:
-		panic(fmt.Errorf("stl: %q is not a valid STL", stl))
+		ctx.ModuleErrorf("stl: %q is not a valid STL", stl)
+		return ""
 	}
 }