Building projects with clang (for compile commands)

Is there a way to built my projects with clang?
If so, can I add arguments to it? For instance, I want clang to export the compile commands so I can use it with vim.
Or is there a way to generate these compile commands without clang?

What does Build.bat does?