Revert "Switch NDK libc++ from prebuilts/ndk to prebuilts/clang"

Revert submission 3195358-ndk-libcxx

Reason for revert: Droidmonitor created revert due to b/356220894. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3195358-ndk-libcxx

Change-Id: Ic9cd3d30637d5ac187d3fc80b34d45083f37064e
diff --git a/cc/testing.go b/cc/testing.go
index ed567af..02f9924 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -38,6 +38,8 @@
 	ctx.RegisterModuleType("cc_cmake_snapshot", CmakeSnapshotFactory)
 	ctx.RegisterModuleType("cc_object", ObjectFactory)
 	ctx.RegisterModuleType("cc_genrule", GenRuleFactory)
+	ctx.RegisterModuleType("ndk_prebuilt_shared_stl", NdkPrebuiltSharedStlFactory)
+	ctx.RegisterModuleType("ndk_prebuilt_static_stl", NdkPrebuiltStaticStlFactory)
 	ctx.RegisterModuleType("ndk_library", NdkLibraryFactory)
 	ctx.RegisterModuleType("ndk_headers", NdkHeadersFactory)
 }
@@ -310,25 +312,6 @@
 			],
 		}
 		cc_library {
-			name: "ndk_libc++_shared",
-			export_include_dirs: ["ndk_libc++_shared_include_dirs"],
-			no_libcrt: true,
-			nocrt: true,
-			system_shared_libs: [],
-			stl: "none",
-			vendor_available: true,
-			vendor_ramdisk_available: true,
-			product_available: true,
-			recovery_available: true,
-			host_supported: false,
-			sdk_version: "minimum",
-			double_loadable: true,
-			apex_available: [
-				"//apex_available:platform",
-				"//apex_available:anyapex",
-			],
-		}
-		cc_library {
 			name: "libc++demangle",
 			no_libcrt: true,
 			nocrt: true,
@@ -414,6 +397,13 @@
 			name: "libprotobuf-cpp-lite",
 		}
 
+		cc_library {
+			name: "ndk_libunwind",
+			sdk_version: "minimum",
+			stl: "none",
+			system_shared_libs: [],
+		}
+
 		ndk_library {
 			name: "libc",
 			first_version: "minimum",
@@ -432,6 +422,11 @@
 			symbol_file: "libdl.map.txt",
 		}
 
+		ndk_prebuilt_shared_stl {
+			name: "ndk_libc++_shared",
+			export_include_dirs: ["ndk_libc++_shared"],
+		}
+
 		cc_library_static {
 			name: "libgoogle-benchmark",
 			sdk_version: "current",
@@ -562,6 +557,13 @@
 
 		RegisterLlndkLibraryTxtType(ctx)
 	}),
+
+	// Additional files needed in tests that disallow non-existent source files.
+	// This includes files that are needed by all, or at least most, instances of a cc module type.
+	android.MockFS{
+		// Needed for ndk_prebuilt_(shared|static)_stl.
+		"defaults/cc/common/current/sources/cxx-stl/llvm-libc++/libs": nil,
+	}.AddToFixture(),
 )
 
 // Preparer that will define default cc modules, e.g. standard prebuilt modules.
@@ -570,17 +572,17 @@
 
 	// Additional files needed in tests that disallow non-existent source.
 	android.MockFS{
-		"defaults/cc/common/libc.map.txt":                   nil,
-		"defaults/cc/common/libdl.map.txt":                  nil,
-		"defaults/cc/common/libft2.map.txt":                 nil,
-		"defaults/cc/common/libm.map.txt":                   nil,
-		"defaults/cc/common/ndk_libc++_shared_include_dirs": nil,
-		"defaults/cc/common/crtbegin_so.c":                  nil,
-		"defaults/cc/common/crtbegin.c":                     nil,
-		"defaults/cc/common/crtend_so.c":                    nil,
-		"defaults/cc/common/crtend.c":                       nil,
-		"defaults/cc/common/crtbrand.c":                     nil,
-		"external/compiler-rt/lib/cfi/cfi_blocklist.txt":    nil,
+		"defaults/cc/common/libc.map.txt":                nil,
+		"defaults/cc/common/libdl.map.txt":               nil,
+		"defaults/cc/common/libft2.map.txt":              nil,
+		"defaults/cc/common/libm.map.txt":                nil,
+		"defaults/cc/common/ndk_libc++_shared":           nil,
+		"defaults/cc/common/crtbegin_so.c":               nil,
+		"defaults/cc/common/crtbegin.c":                  nil,
+		"defaults/cc/common/crtend_so.c":                 nil,
+		"defaults/cc/common/crtend.c":                    nil,
+		"defaults/cc/common/crtbrand.c":                  nil,
+		"external/compiler-rt/lib/cfi/cfi_blocklist.txt": nil,
 
 		"defaults/cc/common/libclang_rt.ubsan_minimal.android_arm64.a": nil,
 		"defaults/cc/common/libclang_rt.ubsan_minimal.android_arm.a":   nil,