From 00408eab253928f4e38049ddcce3a91a7a63cda4 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Fri, 4 Oct 2024 16:07:29 -0700 Subject: Remove cross compilation support from go packages Go packages supported cross-compilation (to linux_musl at least), but go binaries did not. Go packages also add a reverse dependency onto the binary packages, which would cause a missing dependency error, except that all non-primary variants of go modules essentially disable themselves and reuse outputs from the primary variants. However, in mac builds, for some reason the primary variant is arm64 but the binary is only created for x86_64. This causes the missing dependency, but mac sets AllowMissingDependencies, but the missing dependencies still cause problems when generating soong documentation. After we submit this cl, we can potentially make the go modules not copy outputs from the primary variation, and instead have all variations work independently. Bug: 369916167 Test: m soong_docs on mac Change-Id: I967e63fc16f3b2a5cc1fa00ab62f5626b268c087 --- golang/golang.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/golang/golang.go b/golang/golang.go index 618a0852b..6ee924f1d 100644 --- a/golang/golang.go +++ b/golang/golang.go @@ -22,6 +22,7 @@ package golang import ( "android/soong/android" + "github.com/google/blueprint" "github.com/google/blueprint/bootstrap" ) @@ -46,7 +47,7 @@ type GoPackage struct { func goPackageModuleFactory() android.Module { module := &GoPackage{} module.AddProperties(module.Properties()...) - android.InitAndroidArchModule(module, android.HostSupported, android.MultilibFirst) + android.InitAndroidArchModule(module, android.HostSupportedNoCross, android.MultilibFirst) return module } -- cgit v1.2.3-59-g8ed1b