rules_go
rules_go copied to clipboard
feat: support syso files in srcs.
What type of PR is this?
Feature
What does this PR do? Why is it needed?
This change adds support for including .syso files in srcs, which enables embedding version and icon info into windows executables.
Which issues(s) does this PR fix?
Fixes #2757
Other notes for review
Have been using this patch internally since dec 2020 with success. Getting more annoying to keep this patch in sync with rules_go releases :)
This looks good to me, but could you add test coverage? I don't really know how these files work, but adding a go_test with such a file in srcs somewhere under tests would definitely be sufficient.
To test syso support:
bazel build //tests/core/go_binary:hello_syso
copy built bin to a windows box -> right click view properties
@fmeum sorry for ghosting this pr. Added a small test bin that shows the functionality. Not sure the best way to ensure running goversioninfo is easy in this repo. The resource.syso file shouldn't need to be regenerated, but just in case. Open to feedback on how to properly integrate into this repo.
Thank you @fmeum!