Help: How to locate the output directories

28 views
Skip to first unread message

jungh...@airbnb.com

unread,
Jun 7, 2020, 3:37:11 AM6/7/20
to bazel-go-discuss
Hello,

I'm building a same binary for multiple platforms using goarch and goos.
But the output directories are different per platform like

bazel-out/darwin-fastbuild-ST-b60b0173fed1484e0ebf7b54004cf466ecfa7ff2c5159f24ddcfd47243e011b4/...
bazel-out/darwin-fastbuild-ST-05b09dfdd2e5ae92d24745e4e699444f165b36fe4c5cff40bcd8e02b7f69ac79/...
...

How can I get the directory of each platform?

I can use --platforms flag which outputs to bazel-bin/..., but I have to copy the binary after each build which is not ideal in my current environment.
I also tried to use user-define build setting so that I can set the output binary name with a custom flag, but I couldn't find a way to work with go_binary rule.

I'm using  rules_go 0.23.3.

Thanks in advance for any help! 

Reply all
Reply to author
Forward
0 new messages