Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coroutine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
llvm: [14, 18, 19, 21]
llvm: [19, 21, 22]
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
llvm: [14, 15, 16, 17, 18, 19, 20, 21]
llvm: [14, 15, 16, 17, 18, 19, 20, 21, 22]
go-version: [1.18.x, 1.21.x, 1.22.x]
steps:
- name: Checkout
Expand All @@ -33,7 +33,7 @@ jobs:
# run: brew update
# Optional step when a LLVM version is very new.
- name: Update Homebrew
if: matrix.llvm == 21
if: matrix.llvm == 22
run: brew update
- name: Install LLVM
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@${{ matrix.llvm }}
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
llvm: [14, 15, 16, 17, 18, 19, 20, 21]
llvm: [14, 15, 16, 17, 18, 19, 20, 21, 22]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
10 changes: 5 additions & 5 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ This library provides bindings to a system-installed LLVM.

Currently supported:

* LLVM 20, 19, 18, 17, 16, 15 and 14 from [apt.llvm.org](http://apt.llvm.org/) on Debian/Ubuntu.
* LLVM 20, 19, 18, 17, 16, 15 and 14 from Homebrew on macOS.
* LLVM 22, 21, 20, 19, 18, 17, 16, 15 and 14 from [apt.llvm.org](http://apt.llvm.org/) on Debian/Ubuntu.
* LLVM 22, 21, 20, 19, 18, 17, 16, 15 and 14 from Homebrew on macOS.
* Any of the above versions 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=llvm17`
to use LLVM 17.
You can select the LLVM version using a build tag, for example `-tags=llvm22`
to use LLVM 22.

## Usage

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

go get github.com/xgo-dev/llvm

You can use build tags to select a LLVM version. For example, use `-tags=llvm15` to select LLVM 15. Setting a build tag for a LLVM version that is not supported will be ignored.
You can use build tags to select a LLVM version. For example, use `-tags=llvm22` to select LLVM 22. Setting a build tag for a LLVM version that is not supported will be ignored.

## License

Expand Down
2 changes: 1 addition & 1 deletion llvm_config_llvm19.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !byollvm && !llvm14 && !llvm15 && !llvm16 && !llvm17 && !llvm18 && !llvm20 && !llvm21
//go:build !byollvm && !llvm14 && !llvm15 && !llvm16 && !llvm17 && !llvm18 && !llvm20 && !llvm21 && !llvm22

package llvm

Expand Down
19 changes: 19 additions & 0 deletions llvm_config_llvm22.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//go:build !byollvm && llvm22

package llvm

// #cgo darwin,amd64 CPPFLAGS: -I/usr/local/opt/llvm@22/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
// #cgo darwin,amd64 CXXFLAGS: -std=c++17
// #cgo darwin,amd64 LDFLAGS: -L/usr/local/opt/llvm@22/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM -lz -lm
// #cgo darwin,arm64 CPPFLAGS: -I/opt/homebrew/opt/llvm@22/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
// #cgo darwin,arm64 CXXFLAGS: -std=c++17
// #cgo darwin,arm64 LDFLAGS: -L/opt/homebrew/opt/llvm@22/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lLLVM -lz -lm
// #cgo freebsd CPPFLAGS: -I/usr/local/llvm22/include -I/usr/local/llvm22/include/llvm-c -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
// #cgo freebsd CXXFLAGS: -std=c++17
// #cgo freebsd LDFLAGS: -L/usr/local/llvm22/lib -lLLVM
// #cgo linux CPPFLAGS: -I/usr/include/llvm-22 -I/usr/include/llvm-c-22 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
// #cgo linux CXXFLAGS: -std=c++17
// #cgo linux LDFLAGS: -L/usr/lib/llvm-22/lib -lLLVM-22
import "C"

type run_build_sh int
Loading