Can I instruct bazel to emit a “.elf” suffix to executables?
问题 cc_binary (on osx / linux) creates executables with no suffix. This makes sense, since the standard on those platforms is to not use extensions. When using Bazel as a cross-compiler through a custom CROSSTOOL, though, I'd like Bazel to emit an elf file with an explicit .elf suffix. Is this possible, either through CROSSTOOL or a custom "rename" rule? 回答1: You can name your cc_binary 'foo.elf' and bazel will just build it. Or you can use genrule to do the renaming afterwards. Now if you need