go: allow recipes to override the build mode for golang
PATCH 1/1 go: allow recipes to override the build mode for golang
From: Brendan Kerrigan <[email protected]>
Signed-off-by Brendan Kerrigan <[email protected]>
--- meta/classes/go.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/go.bbclass +2 -1
@@ -28,6 +28,7 @@ export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" export GOPTESTFLAGS ?= "" GOBUILDFLAGS_prepend_task-compile = "${GO_PARALLEL_BUILD} " +GOBUILDMODE ?= "pie" export GO = "${HOST_PREFIX}go" GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE}"
@@ -187,5 +188,5 @@ python() { if 'mips' in d.getVar('TARGET_ARCH'): d.appendVar('INSANE_SKIP_%s' % d.getVar('PN'), " textrel") else: - d.appendVar('GOBUILDFLAGS', ' -buildmode=pie') + d.appendVar('GOBUILDFLAGS', ' -buildmode=%s' % d.getVar('GOBUILDMODE')) }
Signature · 1 line
2.17.1