[LLVMdev] [RFC] Progress report on CMake build system's ability to replace autoconf

Chris Bieneman
Tue, 03 Feb 2015 19:08:34 -0000

So, we’ve had this conversation a few times, and I wanted to coalate a status
report for all the interested parties.

Here's the outstanding work and my (not necissarily correct) view of the
status and importance of each one:

* Bug 12157 - llvmconfig.cmake.in make cmake installations not relocatable
  - There are patches on the bug that we should review, test, and land

* Bug 14109 - CMake build for compiler-rt should use just-built clang
  - Still waiting for patches, I don't think this is a blocker

* Bug 15493 - No option to build shared libLLVM-version.so in CMake
  - Patches out for review http://reviews.llvm.org/D6157

* Bug 18496 - [cmake] .S assembly files not compiled by cmake in
libclang_rt.ARCH
  - Unclear if this is still a problem

* Bug 18722 - Option to use CMake with libc++ to compile clang
  - I think this is done by passing -DLLVM_ENABLE_LIBCXX=On

* Bug 19462 - Use the INSTALL(EXPORT ...) to export CMake definitions
  - I believe this is all done. I've never managed to get the import part of
this to work, but the export files are generated

* Bug 19875 - libraries and executables need different rpaths
  - Still outstanding, I don't think this is a blocker.

* Bug 21560 - Add support to cmake for using installed versions of LLVM and
Clang
  - Takumi commented that this works.

* Bug 21561 - Update release scripts to use CMake
  - Still outstanding and blocking removal of autoconf

* Bug 21562 - Add a CMake equivalent for make/platform/clang_darwin.mk in
compiler_rt
  - From discussions on llvm-dev and IRC the proper fix for this is a
cross-compiling approach for compiler_rt builds, and this is a blocker.

* Bug 21568 - Cannot add rpath
  - It looks like this is not a blocker because it can be done, but is unwieldy.
I think this may be made a lot easier with help from the CMake developers.

* Bug 21569 - Can't `make install prefix=/tmp/llvm' with CMake.
  - I think this is a fundamental difference between CMake and autoconf, and
people just need to get used to the difference

* Bug 21570 - Cannot set default configuration options for CMake
  - I think you can do this in CMake by creating a toolchain file and passing it
in with CMAKE_TOOLCHAIN_FILE


Other issues not tracked by bugs:

* FreeBSD seemed to have problems with CMake identifying itself as amd64 causing
x86_64 tests to fail
* Migrating buildbots
* CMake builds for libc++?


Thoughts? Anything missing?

-Chris