This repo provides an example usage for LLVM IR cmake pipelines.
- cmake 3.2.0 or later
- LLVM IR cmake pipelines
- LLVM IR cmake utilities
- LLVM/Clang
git clone --recursivethis repo.- Create a directory for an out-of-source build and
cdinto it. - Provide the appropriate option to
cmakeduring configuration. For examples on the various options have a look at the export scripts (provided for convenience) located in theutils/scripts/buildsubdirectory. Then, you can use thebuild.shscript located in the same directory to build the project.
This repository provides 2 example uses for generating LLVM IR bitcode using:
First, the subproject under the subdirectory statically shows how to use a chain/pipeline of various LLVM opt
passes by specifying them in the lists file. For this, see the configuration options in the following export scripts
under utils/scripts/build:
exports_deps1.shexports_deps2.sh
Second, the subproject under the subdirectory dynamically provides a working example on how to chain/pipeline and
group passes by specifying their order during configuration. For this, see the configuration options in the following
export scripts under utils/scripts/build:
exports_deps3.shexports_deps4.sh