[LLVMdev] Is there room for another build system?

Óscar Fuentes
2008-07-30T18:09:09Z

Chris Lattner <clattner at apple.com> writes:

> Ok.  Killing off autoconf would be a huge bonus, but should probably
> be done as a second step.

My plan is a staged one:

First, support MSVC++.

Second, implement what `configure' does now. MSVC++ users would be the
first ones to take advantage of this, instead of the current hack Visual
Studio does.

Finally, add capabilities for replacing current hand-made makefiles on
all platforms.

Once the work is done, killing off autoconf and hand-made makefiles is
up to you. CMake can live with them and the amount of maintenance work
it adds is minimal.

[snip]

>> 1. General LLVM users: Are you so happy with `configure' and
hand-made
>> makefiles that you wont consider an alternative? If you are
>> interested,
>> I can steer my work to cover all platforms.
>
> I would prefer to kill off makefiles if we have something better.  We
> really only want to support one build system.

My knowledge of the LLVM build system is far from complete, but right
now there is one feature which I think is tricky to implement on CMake:
if you add/remove a source file, the build system we have now does the
right thing. In CMake, you are required to update the list of source
files on the CMakeLists.txt file. Actually, it is possible for CMake to
read the contents of the source directory on the configure phase, but
this disallows other interesting things.

Other tricky thing is to integrate user code on the LLVM build
system. I'm thinking on people who is coding their own extensions to
LLVM, for instance, and that work outside the LLVM source tree.

I need to read again the docs about the LLVM build system.

>> 3. LLVM administrators: Do you object to having a CMakeLists.txt file
>> on every source directory?
>
> No, particularly if it means we eventually lose the Makefile :).

Okay, I'll keep working on this project then.

> One trick is that we want to keep llvm-config and the
> 'LINK_COMPONENTS' system used when building tools.  I am sure cmake
> can handle this, but I just wanted to mention that it is important.

Actually, I plan to use llvm-config (and LINK_COMPONENTS) even for VC++
users :-). Probably as an alternative, as some Visual Studio users would
complain if Perl is a requirement for building LLVM.

--
Oscar