3

This sounds a bit stupid. But I can't find any information about this in the documentation. This is more of a pre-emptive question to get it out of the way

But when you compile Clang/LLVM 4.0 in Win64, what runtime library does Clang immediately default to when compiling applications for Windows through the console? Is it what ever it was compiled with at the time? Or what ever the VSBuild Tools were set up for at the time?

To add in more context. I am compiling from the VS2015 x64 Build Tools outside of Visual Studios without the aide of a solution or project at the moment. And I will later go onto have CMake generate the projects for compilation.

My main reason for coding outside of VS is for better organization, and cross platform compatibility.

  • Are you *compiling* Clang itself, or are you compiling *with* Clang? If you are compiling your code with Clang on Windows, it's going to use Microsoft's C runtime library, the same one that Microsoft's compiler would have used. – Cody Gray - on strike Dec 22 '16 at 11:38
  • @CodyGray Compiling with Clang. And alright. So if I am using the VS2015 Build tools as the build environment. Then I need to ship with the VS 2015 Runtime? – moonshineTheleocat Dec 22 '16 at 14:04
  • 1
    Yes, you'll need to ship the appropriate version of Microsoft's CRT. (That is, unless you statically link the runtime. Not sure if Clang supports this configuration option or not, I haven't played with it.) – Cody Gray - on strike Dec 22 '16 at 14:07
  • 1
    @CodyGray I'm unsure myself. The darn thing's documentation isn't the greatest in the world. But it's also not a good idea to statically link the CRT in the first place. – moonshineTheleocat Dec 22 '16 at 14:22

0 Answers0