<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I’d just wrote a small tool that helps developers to quickly create an out-of-tree LLVM executable/pass project template.</div><div class=""><a href="https://github.com/mshockwave/generator-llvm" class="">https://github.com/mshockwave/generator-llvm</a></div><div class="">It leverages the yeoman framework in Node.js, which is widely used to generate templates for different kinds of web from-end projects.</div><div class="">After installing Node.js and npm, you just need to install yeoman and this generator:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>npm install -g yo</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>npm install -g generator-llvm</div><div class=""><br class=""></div><div class="">After that, please refer the README for generating different kinds of project. For example, creating template for a LLVM pass project:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>yo llvm:pass init</div><div class=""><br class=""></div><div class="">I have to admit that remembering the minimum source code and CMakeLists.txt for a LLVM executable or pass is not so hard - but typing them are often boring boilerplate jobs</div><div class="">Sometimes we just want to prototype our optimization algorithm or inspecting some API behaviors, so the real body of code is often short, and it make sense to bootstrap the essential of a project by automatic tools.</div><div class=""><br class=""></div><div class="">I think this project can also be a good tool for helping new comers to get familiar with LLVM. </div><div class="">Please don’t hesitate to improve the template code by either leaving comments in this thread or sending PR to the repo. </div><div class=""><br class=""></div><div class="">P.S. I understand that most of the folks here is more familiar with python and I believe that there are many great template libraries in python. However, yeoman is a mature framework for not just template engine, but project bootstrapping, also, Node.js is easy to install, access, and getting more and more common nowadays. </div><div class=""><br class=""></div><div class="">P.S.S. If you want to modify the template code directly, here is the reference for the template engine that may help: <a href="http://ejs.co/" class="">http://ejs.co/</a> </div><div class=""><br class=""></div><div class="">Best Regards,</div><div class="">Bekket McClane</div></div></body></html>