4

From llvm's site, I can dowload the prebuilt binary of LLVM 4.0. After having installed the prebuilt binary on Windows with Visual Studio 2017, I can easily switch the compiler between VC++ and Clang 4.0 via Platform Toolset options.

From Getting Started with the LLVM System using Microsoft Visual Studio, I can also build LLVM toolchain (result in many executables) on Windows. However, I don't know how to make a prebuilt installer and get the same effects as the official version provided.

Because llvm's site doesn't provide prebuilt binary for LLVM 5.0 (SVN), so I have to do it myself.

Is there a tutorial telling me how to build the installer of LLVM 5.0 (SVN) from LLVM's source code?

Thanks in advance.

==================

Why LLVM 5.0

The following C++17's features are available in LLVM 5.0 only:

  1. Template argument deduction for class templates
  2. constexpr lambda expressions
xmllmx
  • 39,765
  • 26
  • 162
  • 323

2 Answers2

2

As a quick hack you can overwrite prebuilt binaries with those you've compiled. Or take a look at <LLVMInstallDir>/tools/msbuild directory, it contains bat scripts to install LLVM toolchain. You can alter and run them to add another toolchain that would use SVN versions.

arrowd
  • 33,231
  • 8
  • 79
  • 110
1

You can use the Clang Power Tools extension to add any custom LLVM versions directly from Visual Studio. It comes with the latest LLVM version support(now its LLVM 11) and you can install any version you want from the extension settings panel.

To do that open CPT Settings -> select the LLVM Tab -> choose the version you want to install and press the install button. Now the setup is complete, no other configuration is needed.

This feature is better described in this blog post.

PS: I'm one of the developers of this extension and the project is open source.

Ionut Enache
  • 461
  • 8
  • 22