Skip to content
Commit eaa7a61d authored by Ahmed Hossam's avatar Ahmed Hossam Committed by Richard Purdie
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>
parent 877b27b0
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