I tried to compile a DLL. The compiler produced many object files but failed to link them because it said it doesn't understand the option --dll. I edit the options_clang.xml and remove -Wl,--dll from the value of LinkDynamic so it's basically like this:
<Command name="LinkDynamic"
value="$linker -shared -Wl,--output-def=$def_output -Wl,--out-implib=$static_output $libdirs $link_objects $link_resobjects -o $exe_output $link_options libs"/>
After that it could link the object files and produce a DLL.