Fix mismatch between cc and python for windows prefer32

Windows prefer32 was implemented in cc, which caused a mismatch
between cc and other packages like python.  This manifested as
missing variant when a python_test_host with compile_multilib: "first"
tried to depend on a cc_binary_host, which implicitly has multilib
"first".

Fixes: 177904375
Test: m checkbuild
Change-Id: Iaaac16ae171c06d90d04d7cac11789d3f39b8d99
diff --git a/android/arch.go b/android/arch.go
index 34f9b29..baee9be 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -617,11 +617,15 @@
 	}
 
 	// Some modules want compile_multilib: "first" to mean 32-bit, not 64-bit.
-	// This is used for Windows support and for HOST_PREFER_32_BIT=true support for Art modules.
+	// This is used for HOST_PREFER_32_BIT=true support for Art modules.
 	prefer32 := false
 	if base.prefer32 != nil {
 		prefer32 = base.prefer32(mctx, base, os)
 	}
+	if os == Windows {
+		// Windows builds always prefer 32-bit
+		prefer32 = true
+	}
 
 	// Determine the multilib selection for this module.
 	multilib, extraMultilib := decodeMultilib(base, os.Class)
diff --git a/cc/cc.go b/cc/cc.go
index d719006..68514e8 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1012,10 +1012,6 @@
 		c.AddProperties(feature.props()...)
 	}
 
-	c.Prefer32(func(ctx android.BaseModuleContext, base *android.ModuleBase, os android.OsType) bool {
-		// Windows builds always prefer 32-bit
-		return os == android.Windows
-	})
 	android.InitAndroidArchModule(c, c.hod, c.multilib)
 	android.InitApexModule(c)
 	android.InitSdkAwareModule(c)