{"id":15755288,"url":"https://github.com/tgymnich/outoftreellvmpass","last_synced_at":"2026-07-15T00:36:47.661Z","repository":{"id":124646480,"uuid":"234202396","full_name":"tgymnich/OutOfTreeLLVMPass","owner":"tgymnich","description":"🧾Template for creating an out of tree llvm pass that can be built with pre compiled llvm binaries or from llvm source.","archived":false,"fork":false,"pushed_at":"2021-07-17T00:42:24.000Z","size":10,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T05:53:04.156Z","etag":null,"topics":["llvm","llvm-pass","out-of-tree","template"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tgymnich.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-16T00:43:24.000Z","updated_at":"2022-05-07T17:54:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"56c725a4-7bcd-418f-bfc9-b87b3a896d7e","html_url":"https://github.com/tgymnich/OutOfTreeLLVMPass","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/tgymnich/OutOfTreeLLVMPass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgymnich%2FOutOfTreeLLVMPass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgymnich%2FOutOfTreeLLVMPass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgymnich%2FOutOfTreeLLVMPass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgymnich%2FOutOfTreeLLVMPass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgymnich","download_url":"https://codeload.github.com/tgymnich/OutOfTreeLLVMPass/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgymnich%2FOutOfTreeLLVMPass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35485403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"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":["llvm","llvm-pass","out-of-tree","template"],"created_at":"2024-10-04T08:21:05.675Z","updated_at":"2026-07-15T00:36:47.646Z","avatar_url":"https://github.com/tgymnich.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OutOfTreeLLVMPass\n\nTemplate for creating an out of tree llvm pass that can be built with pre-compiled llvm binaries or from llvm source.\n\n## Setup the build system\n\n### llvm sources\n\nClone this repository and the llvm source next to each other and create a build folder. \nRun cmake from within the build folder:\n```\ngit clone https://github.com/tgymnich/OutOfTreeLLVMPass.git\ngit clone https://github.com/llvm/llvm-project.git\nmkdir build\ncd build\ncmake -DPATH_TO_LLVM=../llvm-project/llvm ../OutOfTreeLLVMPass\n```\n\n### pre-compiled llvm\n\nClone this repoitory and install or download a pre-compiled version of llvm for your system. The example uses macOS and llvm 9.0.0.\nRun cmake from within the build folder.\n```\ngit clone https://github.com/tgymnich/OutOfTreeLLVMPass.git\nwget http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-darwin-apple.tar.xz\ntar xzf clang+llvm-9.0.0-x86_64-darwin-apple.tar.xz\nmkdir build\ncd build\ncmake -DPATH_TO_LLVM=../clang+llvm-9.0.0-x86_64-darwin-apple ../OutOfTreeLLVMPass\n```\n\n## Build the pass\n\n```\ncmake --build .\n```\n\n## Run the pass\n\nMake sure to provide some bitcode or LLVM IR in `hello.bc` / `hello.ll`. If your are not using macOS make sure to adapt the file ending for the compiled module to `.so` or `.dll`.\n\n### llvm source\n\n```\n./llvm-build/bin/opt -load OutOfTreeLLVMPass.dylib -hello \u003c hello.ll \u003e /dev/null\n\n```\n\n### pre-compiled llvm\n\n```\n../clang+llvm-9.0.0-x86_64-darwin-apple/bin/opt -load OutOfTreeLLVMPass.dylib -hello \u003c hello.ll \u003e /dev/null\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgymnich%2Foutoftreellvmpass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgymnich%2Foutoftreellvmpass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgymnich%2Foutoftreellvmpass/lists"}