mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-05 05:15:25 +02:00
cni: pass BuildVersion info to avoid runtime warning
The default value of BuildVersion is 'unknown' and it requires an override at link time to embed such version info into binary. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
parent
b50d4899fa
commit
7ccaa4ac22
|
@ -34,6 +34,7 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464
|
|||
GO_IMPORT = "import"
|
||||
|
||||
PV = "v1.2.0-rc0+git${SRCREV_cni}"
|
||||
CNI_VERSION = "v1.2.0"
|
||||
|
||||
inherit go
|
||||
inherit goarch
|
||||
|
@ -68,7 +69,7 @@ do_compile() {
|
|||
for p in $PLUGINS; do
|
||||
plugin="$(basename "$p")"
|
||||
echo "building: $p"
|
||||
${GO} build ${GOBUILDFLAGS} -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
|
||||
${GO} build ${GOBUILDFLAGS} -ldflags '-X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=${CNI_VERSION}' -o ${B}/plugins/bin/$plugin github.com/containernetworking/plugins/$p
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user