[LLVMdev] compiler-rt CMake build

Alexey Samsonov samsonov at google.com
Thu Feb 27 01:19:08 PST 2014


On Wed, Feb 26, 2014 at 9:58 PM, Brad King <brad.king at kitware.com> wrote:

> On 02/26/2014 12:43 PM, Alexey Samsonov wrote:
> > Do you think it makes sense to land my ExternalProject_Add patch
> > so that others can experiment with it? I can add quit with a
> > fatal_error/warning if the build tree rules are generated with Ninja.
>
> Since it is conditional on LLVM_BUILD_EXTERNAL_COMPILER_RT, yes.
>

Submitted as r202367.


>
> > parallelism doesn't work when I run "make check-compiler-rt -j8"
> > in the original build tree, presumably because we call
> > "cd /path/to/compiler-rt/build/tree && make check-all" there.
>
> Right.  The ExternalProject module has a special case for the
> Makefile generators to make with $(MAKE) instead of "make":
>
>
> http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/ExternalProject.cmake;hb=v2.8.12.2#l846
>
> so that flags like -j propagate automatically.  You could do
> that too:
>
>   if(CMAKE_GENERATOR MATCHES "Make")
>     set(check_compiler_rt "$(MAKE)" "check-all")
>   else()
>     set(check_compiler_rt ${CMAKE_COMMAND} --build .
>       --target check-all --config $<CONFIGURATION>)
>   endif()
>
>   ExternalProject_Get_Property(compiler-rt BINARY_DIR)
>   add_custom_target(check-compiler-rt
>     COMMAND ${check_compiler_rt}
>     DEPENDS compiler-rt
>     WORKING_DIRECTORY ${BINARY_DIR}
>     VERBATIM
>     )
>
>
This worked, thanks! Currently I also print fatal_error message if I detect
Ninja as a CMAKE_GENERATOR.


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140227/cce3482d/attachment.html>


More information about the llvm-dev mailing list