From c6a773df6493ac4697d9e6ad244028a54eceabec Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 14 May 2024 21:49:11 +0900 Subject: Filter-out deps of unsupported arch When a common-arch module (ex: phony) has the "required" dependencies on native modules (ex: cc_library), both 32 and 64-bit variants of the native modules are added as dependencies. This by itself is fine and actually is intended, otherwise there's no way for us to install both arch variants via required deps. However, this imposes a problem when the common-arch module is depended on by a filesystem module with compile_multilib: "first". Here, the expectation is that only the first variant (64-bit) of the native module is instaled, but in reality both variants are installed. To handle this situation, make sure that the packaging routine filters out packaging specs from unsupported architecture. Bug: N/A Test: go test ./... under soong/filesyste Change-Id: Ie1ad5ace2e5d88e00183a115f4a76e5df87a8166 --- android/module_context.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'android/module_context.go') diff --git a/android/module_context.go b/android/module_context.go index 3c1e30a6c..18adb3002 100644 --- a/android/module_context.go +++ b/android/module_context.go @@ -497,6 +497,7 @@ func (m *moduleContext) packageFile(fullInstallPath InstallPath, srcPath Path, e partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), + archType: m.target.Arch.ArchType, } m.packagingSpecs = append(m.packagingSpecs, spec) return spec @@ -622,6 +623,7 @@ func (m *moduleContext) InstallSymlink(installPath InstallPath, name string, src partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), + archType: m.target.Arch.ArchType, }) return fullInstallPath @@ -665,6 +667,7 @@ func (m *moduleContext) InstallAbsoluteSymlink(installPath InstallPath, name str partition: fullInstallPath.partition, skipInstall: m.skipInstall(), aconfigPaths: m.getAconfigPaths(), + archType: m.target.Arch.ArchType, }) return fullInstallPath -- cgit v1.2.3-59-g8ed1b