Skip to content
Commit 4c0c5edb authored by Ahmed Hossam's avatar Ahmed Hossam Committed by Anuj Mittal
Browse files

go.bbclass: Allow adding parameters to go ldflags



Currently, there is no clean way to pass extra parameters to the go tool link,
which is passed by the go build ldflags flag, the append needs to happen inside
the quotes of the ldflags parameter

See [YOCTO #14554].

Add a variable to allow adding extra parameters to -ldflags in the GO_LDFLAGS
variable, one of the main usecases is setting the application version.

For example, adding to the recipe something like
GO_EXTRA_LDFLAGS="-X main.Version=v1.0.0"
or
GO_EXTRA_LDFLAGS="-X main.Version=${PV}"

Signed-off-by: default avatarAhmed Hossam <Ahmed.Hossam@opensynergy.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit eaa7a61d)
Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
parent 2ea62c23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment