You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
at this time we are using : go build -ldflags "-X 'main.BuildTime=$(date)'" when we want to compile our prog.
Now we want to use gobusybox to assemble all our little program but we how reproduce the same ,
makebb -go-extra-args seems to be not working as we expected.
Regards,
Nicolas
The text was updated successfully, but these errors were encountered:
Hi, you are correct, this was broken. Addressed in #80.
Just a side note: Since programs are rewritten by gobusybox as described in the README, if you have a command called -- say -- printbuildtime which is a package main and has a var BuildTime string global variable, then passing -X 'main.BuildTime=$(date)' will not work in this case. gobusybox will rewrite printbuildtime to be a package, so main.BuildTime won't refer to the correct symbol anymore.
You have to refer to the symbol with the full package path, e.g. if printbuildtime were in github.com/u-root/gobusybox/src/cmd/printbuildtime, here's my makebb invocation after #80:
Hello,
at this time we are using : go build -ldflags "-X 'main.BuildTime=$(date)'" when we want to compile our prog.
Now we want to use gobusybox to assemble all our little program but we how reproduce the same ,
makebb -go-extra-args seems to be not working as we expected.
Regards,
Nicolas
The text was updated successfully, but these errors were encountered: