Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is llvm-config in Windows?

Tags:

I am open to either a Visual Studio answer or a MinGW answer. I just finished building LLVM 3.2 using CMake and Visual Studio 2010. Everything went smoothly, but I have no llvm-config. Do I need it? Every example I see on the intertubes makes use of that tool. If I don't need it, how do I configure my project to make use of LLVM?

To be clear, I am not trying to use LLVM tools/compilers (like clang and whatnot). I am trying to write C++ code that uses the LLVM libraries to produce LLVM IR and even compile that stuff. I setup my include and lib folders. I ran llvm-config in Linux and saw a long list of macros and libraries.

I have a wonderful folder full of goodies. It just has no llvm-config in there: C:\Program Files (x86)\LLVM\

like image 647
TheBuzzSaw Avatar asked Jun 13 '13 20:06

TheBuzzSaw


People also ask

Where is LLVM-config installed?

The llvm-config executable is located in bin\Release or bin\Debug , reflecting the build version.

Where is LLVM installed Windows?

When you get to the PATH settings, make sure to add LLVM to the system PATH: Use the default install location: C:\Program Files\LLVM . Once the installation completes hit 'Finish'.

What is LLVM-config?

llvm-config makes it easier to build applications that use LLVM. It can print the compiler flags, linker flags and object libraries needed to link against LLVM.


1 Answers

llvm-config does not exist in windows prebuilt binaries. You need to compile from the source code to get it.

  1. Grab CMAKE > 3.5 , install it and make sure you add it to PATH.
  2. Download Visual Studio 2019
  3. Donwload the source code (9.0.1 is the latest as I'm writing this)
  4. Extract the source code
  5. Cd into the root of the llvm source-code
  6. In cmd, type cmake . this will generate Visual Studio 2019 sln.
  7. open sln file(LLVM.sln), change the build type to Rlease, build the whole project
  8. navigate to your Rlease\bin, and there you have your llvm-config.exe
like image 156
Hossein Avatar answered Oct 03 '22 06:10

Hossein