I have multiple cc_binary targets which will be build independently to create elf files.
I want to have single target command to build all at once to avoid multiple triggers and add the post build rule to copy all the required elf and other build files to a target folder in the Bazel.
Can I get some help on this?
You can build multiple targets via:
or
Have also a look at rules_multirun.
You can also make a kind of "virtual" binary that only has dependencies
And then just build "build_targets":
Maybe also rules_pkg can help you do fetch together different binary an put them in an archive.