CMake and compiler-rt

Hello,

While compiling clang+compiler-rt using autoconf/make, the build system first build the compiler, and then use it to build compiler-rt.

This is convenient as it allows to build a compiler and runtime libraries for architectures that are not supported by the host compiler in the first place.

While trying to build clang+compiler-rt using cmake, the build system compiles the runtime libraries at the beginning using the host compiler (and failed to included all target architectures). Is it possible to get the same behavior than the autoconf system, or is it a current limit of the cmake build system ?

Thanks
-- Jean-Daniel

Hi Jean-Daniel,

Hello,

While compiling clang+compiler-rt using autoconf/make, the build system first build the compiler, and then use it to build compiler-rt.

This is convenient as it allows to build a compiler and runtime libraries for architectures that are not supported by the host compiler in the first place.

Yes.

While trying to build clang+compiler-rt using cmake, the build system compiles the runtime libraries at the beginning using the host compiler (and failed to included all target architectures). Is it possible to get the same behavior than the autoconf system, or is it a current limit of the cmake build system ?

Yes, currently CMake lacks support for using just-built clang for building compiler-rt. This feature request appears now quite often. I’ve created http://llvm.org/bugs/show_bug.cgi?id=14109 to track this.