]> code.ossystems Code Review - openembedded-core.git/commit
go-mod.bbclass: Add class for `go mod` support
authorOtavio Salvador <otavio.salvador@gmail.com>
Fri, 22 May 2020 02:22:34 +0000 (23:22 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 26 May 2020 22:06:38 +0000 (23:06 +0100)
commit11c2b06ac98cc5064640705712bffa156519f450
tree0ab17c2345733e6c6cdb0e7e6b4e673b16f9541c
parent9106d0381d819dfdb73431b9d209ec09a995914e
go-mod.bbclass: Add class for `go mod` support

When using Go Modules, the the current working directory MUST be at or
below the location of the 'go.mod' file when the go tool is used, and
there is no way to tell it to look elsewhere.  It will automatically
look upwards for the file, but not downwards.

To support this use case, we provide the `GO_WORKDIR` variable, which
defaults to `GO_IMPORT` but allows for easy override.

[YOCTO #13883]

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/go-mod.bbclass [new file with mode: 0644]