]> code.ossystems Code Review - openembedded-core.git/commitdiff
Allow global override of golang GO_DYNLINK
authorOliver Kranz <o.kranz.88@gmail.com>
Thu, 19 Aug 2021 09:22:00 +0000 (11:22 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Aug 2021 07:52:59 +0000 (08:52 +0100)
Small golang applications create massive memory overhead if go-runtime
is deployed. So it is helpfull to be able to disable the GO_DYNLINK
option on a per distro/local.conf basis by making it a ?= instead of =.

Signed-off-by: Oliver Kranz <o.kranz.88@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/goarch.bbclass

index 48dc48dabf7b950a3520847a9708841bc4ec6396..92fec16b82976a9c28556805850e89f3f2cf7621 100644 (file)
@@ -32,13 +32,13 @@ BASE_GOARM:armv5 = '5'
 # Go supports dynamic linking on a limited set of architectures.
 # See the supportsDynlink function in go/src/cmd/compile/internal/gc/main.go
 GO_DYNLINK = ""
-GO_DYNLINK:arm = "1"
-GO_DYNLINK:aarch64 = "1"
-GO_DYNLINK:x86 = "1"
-GO_DYNLINK:x86-64 = "1"
-GO_DYNLINK:powerpc64 = "1"
-GO_DYNLINK:powerpc64le = "1"
-GO_DYNLINK:class-native = ""
+GO_DYNLINK:arm ?= "1"
+GO_DYNLINK:aarch64 ?= "1"
+GO_DYNLINK:x86 ?= "1"
+GO_DYNLINK:x86-64 ?= "1"
+GO_DYNLINK:powerpc64 ?= "1"
+GO_DYNLINK:powerpc64le ?= "1"
+GO_DYNLINK:class-native ?= ""
 GO_DYNLINK:class-nativesdk = ""
 
 # define here because everybody inherits this class