summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-10-04 16:07:29 -0700
committer Cole Faust <colefaust@google.com> 2024-10-04 16:07:29 -0700
commit00408eab253928f4e38049ddcce3a91a7a63cda4 (patch)
tree93d4c847505b029c1ab28f01698f7952e5a1ff6d
parent13e719c089d4e867f3d06d70f2ad93c283ce1081 (diff)
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
-rw-r--r--golang/golang.go3
1 files changed, 2 insertions, 1 deletions
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
}