fix: required deps of phony modules are correctly tracked

ArchType.Multilib of native modules are either lib32 or lib64.
Arch-neural modules have "" not "common".

Bug: 321626681
Test: go test ./...
Change-Id: Ie7e6a5203e9f671487dbf32ea2343ada7407a28f
diff --git a/android/module.go b/android/module.go
index cce4fa6..14e10e7 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1055,7 +1055,7 @@
 		// TODO(jiyong): the Make-side does this only when the required module is a shared
 		// library or a native test.
 		bothInAndroid := m.Device() && target.Os.Class == Device
-		nativeArch := m.Arch().ArchType.Multilib != string(MultilibCommon)
+		nativeArch := InList(m.Arch().ArchType.Multilib, []string{"lib32", "lib64"})
 		sameBitness := m.Arch().ArchType.Multilib == target.Arch.ArchType.Multilib
 		if bothInAndroid && nativeArch && !sameBitness {
 			return
diff --git a/filesystem/Android.bp b/filesystem/Android.bp
index cdf6682..cead5fc 100644
--- a/filesystem/Android.bp
+++ b/filesystem/Android.bp
@@ -10,6 +10,7 @@
         "soong",
         "soong-android",
         "soong-bpf", // for testing
+        "soong-phony", // for testing
         "soong-linkerconfig",
     ],
     srcs: [
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 74c79e3..d5ea2bc 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -23,6 +23,7 @@
 	"android/soong/bpf"
 	"android/soong/cc"
 	"android/soong/etc"
+	"android/soong/phony"
 
 	"github.com/google/blueprint/proptools"
 )
@@ -36,6 +37,7 @@
 	bpf.PrepareForTestWithBpf,
 	etc.PrepareForTestWithPrebuiltEtc,
 	cc.PrepareForIntegrationTestWithCc,
+	phony.PrepareForTestWithPhony,
 	PrepareForTestWithFilesystemBuildComponents,
 )
 
@@ -47,6 +49,7 @@
 				common: {
 					deps: [
 						"bpf.o",
+						"phony",
 					],
 				},
 				lib32: {
@@ -82,6 +85,15 @@
 		cc_library {
 			name: "libbaz",
 		}
+
+		phony {
+			name: "phony",
+			required: ["libquz"],
+		}
+
+		cc_library {
+			name: "libquz",
+		}
 	`)
 
 	// produces "myfilesystem.img"
@@ -93,6 +105,7 @@
 		"lib/libbar.so",
 		"lib64/libbar.so",
 		"lib64/libbaz.so",
+		"lib64/libquz.so",
 		"etc/bpf/bpf.o",
 	}
 	for _, e := range expected {