Skip to content

rflechner/LLVMSharp-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLVMSharp - .NET bindings for LLVM

This library is a .NET wrapper for LLVM 3.2 written in C++/CLI. These bindings are written by hand and aim to provide .NET developers with access to the full LLVM API.

Building LLVM for LLVMSharp

To begin, we will need to download the appropriate LLVM sources and unpack them somewhere (we will refer to that location as LLVM_SRC).

Once we have a copy of the LLVM sources, they need to be configured using CMake. We set both, the "Where is the source code" and the "Where to build the binaries" directories to LLVM_SRC and click "Configure". We choose a recent version of Visual Studio (tested with Visual Studio 11) when prompted.

After a short while, we are presented with a list of build settings. The defaults will work fine. We click "Configure" once more, then click "Generate" afterwards.

Finally, we open LLVM.sln in LLVM_SRC and set the build configuration to Release, then build ALL_BUILD.

Building LLVMSharp

Once we have built LLVM from its sources, we can build LLVMSharp. To do this, we simply need to make sure that Visual Studio can find the LLVM headers and libraries which we do by right-clicking on the project node LLVMSharp in the solution explorer, followed by Properties in the context menu.

In the property pages, we navigate to Configuration Properties / VC++ Directories. We add LLVM_SRC\include to Include Directories and LLVM_SRC\lib\Release to Library Directories. The project should now compile.

About

.NET bindings for LLVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 76.0%
  • C# 24.0%