[LLVMdev] LLVM/Clang SVN: 2 Questions

Óscar Fuentes ofv at wanadoo.es
Sat Jun 2 06:41:04 PDT 2012


MortenMacFly <mac-fly at gmx.net> writes:

[snip]

>> In that case, the hand-made Makefile on tools/llvm-config was
>> still there because he was not using MSYS. With gnuwin32 or a bare mingw
>> install the llvm-config directory is ignored.
>> 
> Ok - this is understood. I have Gnuwin32 tools (including SED) in the path
> at least, too. So should I simply hand-craft my own build?

If you want to try, edit llvm/tools/CMakeLists.txt :

if( NOT WIN32 OR MSYS OR CYGWIN )
  # We currently require 'sed' to build llvm-config, so don't try to build it
  # on pure Win32.
  add_subdirectory(llvm-config)
endif()


remove the `NOT' there. Then switch to the build directory and re-run
the build. `cmake' will be automatically invoked.

> How do you guys create llvm-config on Windows?

Currently, because the logic shown on the code excerpt above,
llvm-config is only built if you are using MSYS or Cygwin. That
restrictrion comes from the past, maybe today `sed' is the only external
tool required for generating llvm-config. And that requirement can be
removed too.

> Is it actually needed?

llvm-config is a convenience tool for the user, i.e. you don't need it
for building LLVM/Clang or for your own projects.

> I found this in may tutorials to easily set-up the command line
> options for Clang based builds.

Yes, it is convenient precisely for that. If you are using cmake for
your own projects, LLVM comes with .cmake modules that do most of the
job of llvm-config.




More information about the llvm-dev mailing list