I am trying to write a macro to build Windows shared libraries (DLL) based on this example: https://github.com/bazelbuild/bazel/tree/master/examples/windows/dll
When I run “bazel build //examples/windows/dll:hello_world-link-to-dll-via-lib” I get the result expected – out folder contains hellolib.dll and import library hellolib.dll.if.lib.
But when I try to just build the DLL target specifically with “bazel build //examples/windows/dll:hellolib” I get nothing – empty out folder.
Interestingly “bazel build //examples/windows/dll:hellolib.dll” produces DLL and the import library as expected.
This is very confusing, why the target “:hellolib.dll” produces the output and the target “:hellolib” which depend on the target “:hellolib.dll” does not produce the output.
Can anybody comment?