{"id":20078427,"url":"https://github.com/hexops-graveyard/llvm-go-bindings","last_synced_at":"2026-05-01T21:01:14.758Z","repository":{"id":54356247,"uuid":"231699499","full_name":"hexops-graveyard/llvm-go-bindings","owner":"hexops-graveyard","description":"Scripts for building the LLVM Go BIndings (including on Windows)","archived":false,"fork":false,"pushed_at":"2021-02-23T16:19:03.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T13:14:10.610Z","etag":null,"topics":["bindings","cgo","go","golang","llvm","llvm-go"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexops-graveyard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-04T02:51:54.000Z","updated_at":"2022-12-22T19:50:01.000Z","dependencies_parsed_at":"2022-08-13T13:10:43.261Z","dependency_job_id":null,"html_url":"https://github.com/hexops-graveyard/llvm-go-bindings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hexops-graveyard/llvm-go-bindings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops-graveyard%2Fllvm-go-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops-graveyard%2Fllvm-go-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops-graveyard%2Fllvm-go-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops-graveyard%2Fllvm-go-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexops-graveyard","download_url":"https://codeload.github.com/hexops-graveyard/llvm-go-bindings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexops-graveyard%2Fllvm-go-bindings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","cgo","go","golang","llvm","llvm-go"],"created_at":"2024-11-13T15:14:24.639Z","updated_at":"2026-05-01T21:01:14.661Z","avatar_url":"https://github.com/hexops-graveyard.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llvm-go-bindings\n\nScripts for building the LLVM Go BIndings (including on Windows)\n\n## Context\n\nThe LLVM project [has some excellent Go bindings](https://github.com/llvm/llvm-project/tree/master/llvm/bindings/go) but, unfortunately, building them is extremely difficult for people unfamiliar with building C++ projects. Additionally, it is impossible currently to compile them on Windows with MSYS (i.e. without Cygwin).\n\nThis repository provides a script and concise instructions for building the LLVM Go bindings on Windows, Linux, and Mac OS easily.\n\n## Prerequisites\n\n### Windows\n\n1. Install [Go 1.12+](https://golang.org/doc/install).\n1. Install [Git for Windows](https://gitforwindows.org/).\n1. Install [LLVM 9.0.0](http://releases.llvm.org/download.html#9.0.0) (see **Pre built binaries** section at bottom).\n    - [Direct download link](http://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe)\n    - Choose **Add LLVM to the system PATH for all users**\n1. Install MinGW-w64 via [MSYS2](http://www.msys2.org/):\n    - Choose the **msys2-x86_64** version.\n1. Install MSYS2 tools:\n    - Launch a `MSYS2 MinGW 64-bit` command prompt\n    - `pacman -S git make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-python3 mingw-w64-x86_64-go`\n\n**IMPORTANT**: Windows Defender and other antivirus applications can slow down compilation by orders of magnitude, disable them before continuing!\n\nFollow the steps provided below using a `MSYS2 MinGW 64-bit` command prompt.\n\n### Mac OS\n\nWork in progress, please file an issue if you are interested in trying this.\n\n### Linux\n\nWork in progress, please file an issue if you are interested in trying this.\n\n## Building with prebuilt LLVM binaries\n\nWork in progress.\n\n## Building from source\n\nThis will download 1.5 GiB (the LLVM Git repository) and on a modern i7 laptop (i7-9750H + 16 GB RAM) will take approximately 60 minutes to complete.\n\nFrom a shell, execute:\n\n```sh\ncurl -Ls https://github.com/hexops/llvm-go-bindings/raw/master/installer.sh | sh\n```\n\nThe LLVM repository will be checked out into `$GOPATH/src/llvm.org` and the bindings can be imported as:\n\n```Go\nimport \"llvm.org/llvm/llvm/bindings/go/llvm\"\n```\n\nGoDoc can be viewed at https://godoc.org/llvm.org/llvm/bindings/go/llvm\n\n## Known issues with Go LLVM bindings\n\nThere are some known issues with the Go LLVM bindings, which I've filed here:\n\n- Impossible to build Go bindings on Windows using MSYS2: https://bugs.llvm.org/show_bug.cgi?id=44551\n  - A patch to resolve this issue is being maintained here: https://github.com/hexops/llvm-project/tree/llvmorg-9.0.1-windows\n- Versioned Go paths are not valid: https://bugs.llvm.org/show_bug.cgi?id=44550\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexops-graveyard%2Fllvm-go-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexops-graveyard%2Fllvm-go-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexops-graveyard%2Fllvm-go-bindings/lists"}