Is empty LLVM_TARGETS_TO_BUILD legal?

Hi all,

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?

Best regards,
Yuri

Yuri Gribov <tetra2005@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.