generator-llvm v1.1.0
LLVM Executable/Pass Templates Generator
Generate project templates for executables that use LLVM and LLVM passes.
Generator Kinds & Guides
Standalone Executable(executable)
A normal executable program that uses LLVM.
Pass(pass)
A LLVM pass that can be easily integrated into LLVM project in the future. See this for more information
Executable(tool)(Status: TBD)
A executable program that can be easily integrated into LLVM project as one of the tools in the future.
Install
Requirements:
Install yeoman:
npm install -g yoInstall this generator from npm repository
npm install -g generator-llvmUsage
Generating Standalone Executable
Boostraping a new project:
yo llvm:executable initAdding new program to existing (executable)project
yo llvm:executable appendGenerating New Pass
Boostraping a new project
yo llvm:pass initAdding new program to existing (pass)project
yo llvm:pass appendIf you like to stay on bleeding edge and want to try the new PassManager pass, add the --new-pm at the tail:
yo llvm::pass init --new-pm
# Same option applies to the "append" command as wellThe generated pass is also loaded as an external plugin. Please refer to this article I wrote about how to run a new PassManager pass.
Note
If you append new executable/pass to existing project, it would show the following message:
conflict ../CMakeLists.txt
? Overwrite ../CMakeLists.txt? (ynaxdH)It is because that we're trying to modify an exist file(the top-level CMakeLists.txt), which is not what yeoman glad to see. However, in this case, press y to overrite is totally fine.
Development
(In this repo folder)Install dependencies:
npm installTemporary link to yeoman's generator repository
npm link