Skip to content

Go bindings to a system-installed LLVM. Used as part of TinyGo.

License

Notifications You must be signed in to change notification settings

eigenhombre/go-llvm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go bindings to system LLVM

This library provides bindings to a system-installed LLVM.

Currently supported:

  • LLVM 15 and 14 from apt.llvm.org on Debian/Ubuntu.
  • LLVM 15 and 14 from Homebrew on macOS.
  • LLVM 15 with a manually built LLVM through the byollvm build tag. You need to set up CFLAGS/LDFLAGS etc yourself in this case.

You can select the LLVM version using a build tag, for example -tags=llvm14 to use LLVM 14.

Usage

If you have a supported LLVM installation, you should be able to do a simple go get:

go get tinygo.org/x/go-llvm

After downloading, you may have to update the configuration for your system:

make config

If you built your own LLVM, you can also use that:

# update LLVM files
make update SRCDIR=<dir>

# configure this LLVM build
make config BUILDDIR=<builddir>

Note that you may have to comment out parts of backports.go if you use a newer version of LLVM.

License

Most of the files are extracted from the LLVM source tree, specifically all *.go, *.cpp, and *.h files come directly from bindings/go/llvm in the LLVM source tree. They are all released under the Apache License 2.0 (with LLVM exceptions). Check upstream LLVM for detailed copyright information.

This README, the backports* files, and the Makefile are separate from LLVM but are licensed under the same license.

About

Go bindings to a system-installed LLVM. Used as part of TinyGo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 92.6%
  • C++ 5.2%
  • Makefile 1.9%
  • C 0.3%