Microsoft will add Clang compiler support in November Visual Studio 2015 update
- Transfer
- Tutorial
Microsoft will add support for the Clang compiler in the November update of Visual Studio 2015 - this was announced at the CPPCon 2015 conference, which is now taking place in Bellevue, USA.
Clang is a C, C ++, and Objective-C code compiler that, in conjunction with LLVM, allows you to build programs for various platforms. Visual Studio 2015 already supports Clang for developing Android and iOS applications. When developing for Android, you can choose between GCC and Clang, but for iOS you have to use an external Mac as a build server.
The planned update will bring Clang support to a whole new level - now they can build regular Windows applications.
The Visual C ++ compiler consists of several parts: the front-end part, which is responsible for generating the AST (abstract syntax tree) corresponding to the program code, and the back-end part, which reads the AST and generates executable code. The frontend part is called C1, the backend part is called C2 and different teams work on them.
Clang is planned to be added as a replacement for C1, while C2 will continue to be used for its intended purpose. As team leader backend Jim Redigan said, Clang will create an intermediate representation of the code, which will then be converted to a format compatible with input C2, which Jim called a set of tuples. Next, C2 will generate executable code using the Universal Tuple Compiler.
The main goal of creating the Clang / C2 bundle is to facilitate cross-platform application development for both Microsoft and third-party developers. Many applications could take out their non-visual parts into separate components, which would be assembled uniformly, by the same Clang compiler under different operating systems.
As an example, Microsoft Office was indicated, the mobile version of which is now available for Android, iOS and Windows 10 Universal Windows Platform. When using Clang as a front-end compiler, the common code of all these applications could be compiled the same way, eliminating the occurrence of bugs due to differences in Clang and C1.
Developers should accept Clang's support well because of its better compliance with the latest C ++ standards. Nevertheless, Microsoft does not stop supporting C1, its development will continue, since the Microsft version of the C ++ standard has some specific additions and the programs that use them still need C1 to build. In addition, the speed of code assembly in the long-running combination C1 \ C2 is slightly higher.
Jim Redigan noted that Microsoft will not fork Clang, but will focus on adding code for the Windows platform to its main branch. At the same time, Clang will not be required to do anything special to support C2, Microsoft will do everything necessary for compatibility on its side.
The planned update in November with support for Clang will have the status of “preview”, and the main release is planned for February 2016.
In addition to Clang support, other innovations are planned, for example, await support in accordance with the current offer from Microsoft.
A new version of the compiler will also be released, allowing you to use the Clang / C2 bundle from the command line (without having to buy and install the Visual Studio IDE).