I see there's a thread where this has been discussed already, but a bit vaguely:
Can I instruct bazel to emit a ".elf" suffix to executables?
Unfortunately that doesn't help in my case. I am trying to compile plugins for Autodesk Maya on windows using Bazel, so my output needs to be a .dll
file with custom extension .mll
. Here's an example code of how my BUILD file is setup:
cc_binary(
name = "myPlugin.dll", # can't rename this to .mll, otherwise bazel won't build
srcs = glob(
[
"myPlugin.h",
"myPlugin.cpp",
]
),
deps = [
"@maya_repo//:Foundation",
"@maya_repo//:OpenMaya",
],
linkopts = [
"-export:initializePlugin",
"-export:uninitializePlugin",
],
linkshared = True,
)
Everything compiles, but I can't seem to find a way to rename the extension to .mll
, I tried documenting on genrules
but I couldn't make it work.
Could someone point me in the right direction?