[LLVMdev] How to build an LLVM pass through visual studio

NAKAMURA Takumi geek4civic at gmail.com
Sat Jun 16 17:15:09 PDT 2012


2012/6/17 Thomson <lilotom at gmail.com>:
> I tried to build an LLVM pass in visual studio with cmake, but it seems
> add_LLVM_loadable_module macro doesn't support non-unix and non-cygwin
> platform. Is loadable module necessary for LLVM pass? Could I just build a
> static library and pass it to opt?   If static library is not supported, is
> there any way to build an LLVM pass through visual studio? Or through clang
> with cmake?

Loadable module is not supported with CMake on Win32.
FYI, as you know, on cygming (also mingw), "configure --enable-shared"
is available.

You cannot load external modules with opt. Instead, embed your pass in
opt (lib/Analysis and lib/Transforms), and build opt.

...Takumi




More information about the llvm-dev mailing list