[LLVMdev] building clang when present
Óscar Fuentes
ofv at wanadoo.es
Mon Jan 19 13:44:38 PST 2009
Mike Stump <mrs at apple.com> writes:
> If there are bugs in the parallel aspects of llvm, I've never hit
> them. I only ever build 8-way, and I expect it to just work; if it
> doesn't, I'd rather just fix it. Avoiding parallel isn't the way to
> get a build system that just works in parallel. Lastly, I'm more
> demanding than, good enough.
>
> I'll add OPTIONAL_PARALLEL_DIRS, if people would rather it be done
> that way. :-)
I see that a significant amount of work is devoted to enhancing/fixing
the current build framework, which is perfectly okay with me, but seeing
once and again how you guys work on the build instead of
enhancing/fixing LLVM itself makes me think "what a waste of talent" :-)
Adding CMake support for integrating clang into the LLVM build took me
about 15 minutes. The only change to the pre-existing LLVM CMake
specification was
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
endif()
and just this gives a lot of benefit: parallel builds, multiplatform,
multicompiler, robustness, etc. With some work it is possible to support
building clang on an arbitrary directory, even putting LLVM as a
subdirectory of clang, which is more natural than the current
arrangement. This feature could be of benefit to those working on their
own compiler too: integrating LLVM on a external CMake build spec would
require three or four lines of code on the user's CMakeFiles.txt. I have
a prototype that does this, but I'm waiting for some extra free time to
polish it.
The only serious non-trivial thing the current LLVM CMake specification
lacks is "make check", and here I'm having some problems. First, because
it is not posible (AFAIK) to completely mimic "make check" (make check
itself is no problem, the options you can use are the tricky part, like
requiring certain test case or set of test cases). Second, because I
don't know what you would consider acceptable, as I have no personal
experience nor criteria about executing test cases. Third, because the
enhancements recently incorporated to the test framework (C++ unit
tests). Fourth and final, because of a severe lack of time.
Implementing the bells and whistles the cmake spec still lacks compared
to configure & make seems an easy work to me.
So if you are on the mood of devoting your time to enhancing the LLVM
build system, please consider working on the CMake spec, and
specifically on "make check" support.
--
Oscar
More information about the llvm-dev
mailing list