[cfe-dev] Is empty LLVM_TARGETS_TO_BUILD legal?

Óscar Fuentes ofv at wanadoo.es
Thu Apr 21 20:18:29 PDT 2011


Yuri Gribov <tetra2005 at googlemail.com> writes:

> Today I have tried building Clang on Windows with
> LLVM_TARGETS_TO_BUILD set to "" (I only need Clang AST so I do not
> want to build any backend at all). I called cmake like
>
>   cmake -G "Visual Studio 9 2008" -DLLVM_TARGETS_TO_BUILD="" .
>
> and it got stuck in an endless loop after saying
> -- Loadable modules not supported on this platform.
>
> Is this expected behavior? If not - how can we fix it?

That possibility was never anticipated by me. If you want just the AST,
my advice is to leave LLVM_TARGETS_TO_BUILD with its default value (X86
on Visual Studio) and, after generating the project files, build the
clangAST target from the IDE. In theory, the unneeded stuff will be
ignored. That's with Visual Studio and suppossing that you don't want to
install the resulting libraries. On unix-like environments (including
MinGW-MSYS) all LLVM libraries will be built before any clang library.




More information about the cfe-dev mailing list