VS, Clang, cross-platform, and a short video

Today my team was part of the Visual Studio 2015 Preview announcement, and it’s nice to be able to share that Visual Studio is now going to support targeting Android and soon iOS, using the Clang compiler, from right inside VS. This is in addition to continued conformance and other improvements in our own VC++ compiler for targeting Microsoft platforms.

I recorded an 8-minute video about Visual C++’s conformance improvements in our existing compiler that you can get now in the Preview available today, and why using a single source code base in C++ built using VC++ to target Windows/WP and also Clang/LLVM to target Android and iOS is a hot ticket right now. The Resources slide at the end includes links to two CppCon videos I hope you’ll check out if you haven’t already.

I hope you enjoy the news, and the Preview.

12 thoughts on “VS, Clang, cross-platform, and a short video

  1. It may be heretical, but it would be awesome to be able to cross-compile c++ code for linux from visual studio. Test locally, perhaps using a docker managed container running on a stripped down linux via hyper-v, and then push to production on azure.

  2. Herb, while gcc might be c++11 comformant, it’s standard library won’t be until gcc 5 is out. I had to switch to clang + libc++ to be able to use move semantics with streams. So, I would say that currently clang is the only fully c++11 conformant compiler.

  3. @Joe: Actually, I see more convergence than ever. It used to be much more true that compilers diverged, but now they’re increasingly delivering new ISO C++ features at closer to the same time. For example, for C++98 it took 5 years to get just the first fully conforming implementation and the major implementations never did fully converge; for C++11 it took 2 years to get two reasonably fully conforming implementations (GCC and Clang); and for C++14 it looks like it’s going to take something like 6 months (both GCC and Clang are now or will very soon be fully C++14 conforming, in Clang 3.4/3.5 and GCC 5.0, and even Visual C++ is going to be very close to full C++14 conformance in 2015, missing only about half a dozen features, mostly small).

  4. @Herb,

    Are there any best practices how to deal with the issue of fragmentation in C++ features implementation? For example GCC might support some of the C++14 features which are not supported by Clang. To me it looks like C++ is now becoming like HTML5. It is always evolving and basically it is a moving target.

  5. It would be nice to see Microsoft invest in Clang as their platform C++ toolchain instead of writing their own. MSVC compiler has been a train wreck since its conception. Always behind or incorrect on the standard. That trend still continues today. There are a bunch of C++11 features I am not able to use in our cross-platform code base (GCC and MSVC) because MSVC12 just isn’t up to snuff. And MSVC13 still won’t have full C++11 support from what I read, that’s 4 years later!!

    If Microsoft stepped up and invested in Clang, they could get it working on Windows from an implementation standpoint instead of worrying about investing time and resources into compiler parsing and standards conformance.

  6. So, we’ll finally get c99, c11, POSIX and the DLL hell will freeze?

    15 years is a long time to wait – what’s a few more?

  7. Clang’s support for Windows just isn’t far enough along yet to be used in production for Windows development. It’s coming along but may be a while yet: http://clang.llvm.org/docs/MSVCCompatibility.html

    I regularly build clang for Windows and it is possible to build and run small C++ programs, but it requires avoiding exceptions and using microsoft’s compiler as a fallback for translation units that clang can’t handle yet. (Clang targets MSVC’s ABI so they can be linked together.)

    Even when clang is ready I’m not sure I want to see it replace VC++ as the default toolchain for naive Windows development. Having both clang ang gcc toolchains available on *nix has been tremendously beneficial in terms of pushing each other forward: clang’s codegen has been improving I think largely due to Google seeing that their code performed better with gcc and working to bring clang up to that. Gcc’s improved diagnostics come out of comparisons with clang, and research done with clang has also gone on to benefit gcc.

    It would be nice to see Microsoft’s C++ compiler get open sourced along with all this other stuff they’re releasing, though…

  8. Will it be possible to use Clang for Windows development as well to avoid the VC++ standard incompatibilities?

  9. Any chance of getting clang for targeting WIN32/WIN64? It would be nice to have an almost completely conformant compiler, and AFAIK the clang team is really close anyways.

Comments are closed.