2

I'm trying to integrate LLVM with Visual Studio 15 2017, however I seem to be unable to get it to work. When running the LLVM installer after Visual Studio has been installed, I get a command prompt with the following error:

Installing MSVC integration...
Failed to find MSBuild toolsets directory. MSVC integration install failed.
Press any key to continue . . .

After some research online, I found this SO link which has lead me to believe that the LLVM installer does not know how to install for VS15. As such, I tried installing the toolset found here manually. Now, I can see LLVM listed as a toolset in Visual Studio:

vs screeenshot

However, when I choose it as an option and try to compile a simple "Hello World" program, I get the following error:

error MSB8020: The build tools for LLVM-vs2017 (Platform Toolset = 'LLVM-vs2017') cannot be found.
To build using the LLVM-vs2017 build tools, please install LLVM-vs2017 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".

Is there something I am doing wrong here, or some step I missed when trying to get these two tools integrated?

compor
  • 2,239
  • 1
  • 19
  • 29
AFlyingCar
  • 83
  • 3
  • 7
  • 1
    It works fine on my side. I installed the `LLVM 6.0.0` automatically by going to the folder where AutoSetup.bat exists and type "AutoSetup":https://github.com/plasmacel/llvm-vs2017-integration/blob/master/README.MD#automatic-installation, then build the HelloWorld project with `LLVM-vs2017` successfully. – Leo Liu Aug 30 '18 at 08:47
  • Yes, running `AutoSetup.bat` seems to have worked. I did that originally, but was getting a bunch of strange errors about it not being able to find the install directory. It seems to be working now though, thank you. – AFlyingCar Aug 30 '18 at 19:08
  • Since running `AutoSetup.bat` works for you, so I convert my comment to the answer, this can be beneficial to other community members reading this thread and easier find the solution. Besides, you can accept it as answer, if it helps you. – Leo Liu Sep 03 '18 at 02:23
  • @LeoLiu-MSFT , If you don't mind can you please tell me from where I can get the AutoSetup.exe , since after installing LLVM , I am unable to find AutoSetup.bat – Rupesh Jan 27 '19 at 20:22

1 Answers1

0

LLVM Visual Studio Integration Failed

After the test, you should execute the AutoSetup.bat to install the LLVM 6.0.0 automatically.

Plasmacel provided a fork which is updated for LLVM 6.0.0 and provides better integration by providing include and library paths of LLVM/clang. In the file README.MD, you can find the some more details, like Automatic Installation:

Automatic Installation

Open a command prompt with Administrator rights (DO NOT OPEN AutoSetup.bat with admin rights it won't load the files)

Go to the folder where AutoSetup.bat exists and type "AutoSetup"

If Automatic doesn't work, you can also go to the Manual Installation.

Hope this helps.

Community
  • 1
  • 1
Leo Liu
  • 71,098
  • 10
  • 114
  • 135