diff --git a/cc/library.go b/cc/library.go
index 86196ce..532b7e9 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -220,7 +220,6 @@
 
 func RegisterLibraryBuildComponents(ctx android.RegistrationContext) {
 	ctx.RegisterModuleType("cc_library_static", LibraryStaticFactory)
-	ctx.RegisterModuleType("cc_rustlibs_for_make", LibraryMakeRustlibsFactory)
 	ctx.RegisterModuleType("cc_library_shared", LibrarySharedFactory)
 	ctx.RegisterModuleType("cc_library", LibraryFactory)
 	ctx.RegisterModuleType("cc_library_host_static", LibraryHostStaticFactory)
@@ -250,19 +249,6 @@
 	return module.Init()
 }
 
-// cc_rustlibs_for_make creates a static library which bundles together rust_ffi_static
-// deps for Make. This should not be depended on in Soong, and is probably not the
-// module you need unless you are sure of what you're doing. These should only
-// be declared as dependencies in Make. To ensure inclusion, rust_ffi_static modules
-// should be declared in the whole_static_libs property.
-func LibraryMakeRustlibsFactory() android.Module {
-	module, library := NewLibrary(android.HostAndDeviceSupported)
-	library.BuildOnlyStatic()
-	library.wideStaticlibForMake = true
-	module.sdkMemberTypes = []android.SdkMemberType{staticLibrarySdkMemberType}
-	return module.Init()
-}
-
 // cc_library_shared creates a shared library for a device and/or host.
 func LibrarySharedFactory() android.Module {
 	module, library := NewLibrary(android.HostAndDeviceSupported)
@@ -451,10 +437,6 @@
 
 	// Path to the file containing the APIs exported by this library
 	stubsSymbolFilePath android.Path
-
-	// Forces production of the generated Rust staticlib for cc_library_static.
-	// Intended to be used to provide these generated staticlibs for Make.
-	wideStaticlibForMake bool
 }
 
 // linkerProps returns the list of properties structs relevant for this library. (For example, if
@@ -1073,16 +1055,6 @@
 	library.objects = library.objects.Append(objs)
 	library.wholeStaticLibsFromPrebuilts = android.CopyOfPaths(deps.WholeStaticLibsFromPrebuilts)
 
-	if library.wideStaticlibForMake {
-		if generatedLib := GenerateRustStaticlib(ctx, deps.RustRlibDeps); generatedLib != nil {
-			// WholeStaticLibsFromPrebuilts are .a files that get included whole into the resulting staticlib
-			// so reuse that here for our Rust staticlibs because we don't have individual object files for
-			// these.
-			deps.WholeStaticLibsFromPrebuilts = append(deps.WholeStaticLibsFromPrebuilts, generatedLib)
-		}
-
-	}
-
 	fileName := ctx.ModuleName() + staticLibraryExtension
 	outputFile := android.PathForModuleOut(ctx, fileName)
 	builderFlags := flagsToBuilderFlags(flags)
diff --git a/rust/library_test.go b/rust/library_test.go
index 6cc4f25..6db9525 100644
--- a/rust/library_test.go
+++ b/rust/library_test.go
@@ -426,45 +426,6 @@
 	android.AssertStringDoesContain(t, "cFlags for lib module", libfooStatic.Args["cFlags"], " -Irust_includes ")
 }
 
-// Make sure cc_rustlibs_for_make has the expected behavior, and that
-// cc_library_static does as well.
-// This is here instead of cc/library_test.go because the test needs to
-// define a rust_ffi module which can't be done in soong-cc to avoid the
-// circular dependency.
-func TestCCRustlibsForMake(t *testing.T) {
-	t.Parallel()
-	result := testRust(t, `
-		rust_ffi_static {
-			name: "libbar",
-			srcs: ["foo.rs"],
-			crate_name: "bar",
-			export_include_dirs: ["rust_includes"],
-			host_supported: true,
-		}
-
-		cc_rustlibs_for_make {
-			name: "libmakerustlibs",
-			whole_static_libs: ["libbar"],
-		}
-
-		cc_library_static {
-			name: "libccstatic",
-			whole_static_libs: ["libbar"],
-		}
-	`)
-
-	libmakerustlibs := result.ModuleForTests(t, "libmakerustlibs", "android_arm64_armv8-a_static").MaybeRule("rustc")
-	libccstatic := result.ModuleForTests(t, "libccstatic", "android_arm64_armv8-a_static").MaybeRule("rustc")
-
-	if libmakerustlibs.Output == nil {
-		t.Errorf("cc_rustlibs_for_make is not generating a  Rust staticlib when it should")
-	}
-
-	if libccstatic.Output != nil {
-		t.Errorf("cc_library_static is generating a Rust staticlib when it should not")
-	}
-}
-
 func TestRustVersionScript(t *testing.T) {
 	ctx := testRust(t, `
 	rust_library {
