[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7642/8267] go.bbclass: Use a global Go build flags
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7642/8267] go.bbclass: Use a global Go build flags
- Date: Sun, 17 Dec 2017 06:32:05 +0000 (UTC)
commit 7a7f0e846f46c4067be63f9f72e61380f32050ac
Author: Otavio Salvador <otavio ossystems com br>
Date: Fri Sep 8 18:04:36 2017 -0300
go.bbclass: Use a global Go build flags
We now use a GOBUILDFLAGS to provide a global variable to control the
build flags to be given to Go.
This change is based on the meta-golang[1] layer. Thanks to Matt
Madison <matt@madison.systems> for his work on this.
1. https://github.com/madisongh/meta-golang
(From OE-Core rev: d6b8e7e94ba6dae44907c5a65bc0bdf0ccebdb15)
Signed-off-by: Otavio Salvador <otavio ossystems com br>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/go.bbclass | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index e073cb9..720a504 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -5,6 +5,8 @@ GOROOT = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin"
GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}"
+export GOBUILDFLAGS ?= "-v"
+
export GOOS = "${TARGET_GOOS}"
export GOARCH = "${TARGET_GOARCH}"
export GOARM = "${TARGET_GOARM}"
@@ -32,7 +34,7 @@ GO_INSTALL ?= "${GO_IMPORT}/..."
do_go_compile() {
GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go env
if [ -n "${GO_INSTALL}" ]; then
- GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install -v ${GO_INSTALL}
+ GOPATH=${S}:${STAGING_LIBDIR}/${TARGET_SYS}/go go install ${GOBUILDFLAGS} ${GO_INSTALL}
fi
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]