"Unfortunately, getting clang to compile MSVC based projects isn't as easy as just dropping in clang and changing a few flags. Let's get started." Errr, use clang-cl, and "yes it is". That's the whole point of clang-cl :)
What are the advantages of using clang-cl over the Microsoft c++ compiler?
Using Clang on Windows
11–20 of 30 posts
Re: Using Clang on Windows
#12"Unfortunately, getting clang to compile MSVC based projects isn't as easy as just dropping in clang and changing a few flags. Let's get started." Errr, use clang-cl, and "yes it is". That's the whole point of clang-cl :)
What are the advantages of using clang-cl over the Microsoft c++ compiler?
Re: Using Clang on Windows
#13Earlier quoted context omitted.
What are the advantages of using clang-cl over the Microsoft c++ compiler?
An (unusual) case I've found it useful for is doing LTO across boundaries with other languages whose compilers use LLVM. I've used it to enable inlining of C++ methods called from Rust (the C++ code in question was V8).
I wonder if this would be applicable with that in combination with gcc-rs.
Disclaimer: I'm also on that rust hype train :)
Re: Using Clang on Windows
#14Earlier quoted context omitted.
Exactly, In fact clang, clang++ and clang-cl are all the same program. The frontend just behaves differently based on the file name. Disclaimer: I am a LLVM Engineer working on a mingw-w64 standalone clang :)
Why is Clang so much slower than cl at compiling? On OS X / unix Clang seems so much faster.
Re: Using Clang on Windows
#15Ouch...
Re: Using Clang on Windows
#16Re: Using Clang on Windows
#17Earlier quoted context omitted.
What are the advantages of using clang-cl over the Microsoft c++ compiler?
By using clang-cl you are getting the advantage of the LLVM backend. LLVM/Clang can target many different platforms besides windows and it is open source so it is sponsored by many large companies including Google Apple etc. Google use it for Chrome for example (which includes windows) and have engineers working full time to meet their needs. Intel, ARM, AMD and co have upstreamed many optimisations into LLVM also. I…
How can that be true? The definition of private internal tooling is that it's not publically distributed, and therefore, GPL isn't a concern.
Unless you distribute the result of your modifications to GCC, both clang and GCC are viable bases from which you make your internal tooling.
Re: Using Clang on Windows
#18Earlier quoted context omitted.
By using clang-cl you are getting the advantage of the LLVM backend. LLVM/Clang can target many different platforms besides windows and it is open source so it is sponsored by many large companies including Google Apple etc. Google use it for Chrome for example (which includes windows) and have engineers working full time to meet their needs. Intel, ARM, AMD and co have upstreamed many optimisations into LLVM also. I…
> Unlike gcc the license for llvm/clang is more liberal so if they want private internal tooling they can still do that also. How can that be true? The definition of private internal tooling is that it's not publically distributed, and therefore, GPL isn't a concern. Unless you distribute the result of your modifications to GCC, both clang and GCC are viable bases from which you make your internal tooling.
And more generally, the internal tool of today can become the hit add-on to your existing product of tomorrow, or a new product line. You want to retain flexibility.
Legal departments aren't just being paranoid when they insist on avoiding GPL-licensed code if at all possible.
Re: Using Clang on Windows
#19Re: Using Clang on Windows
#20"Visual Studio 2017 will not work." Ouch...
"opting in" to VS 2017 is recommended when building Chrome for 64-bit Windows to get improved incremental linking support. (We still link Chrome on Windows with link.exe even when compiling with Clang.)