[llvm] r231842 - Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a release tablegen build when LLVM is configured with assertions enabled.

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 11:54:39 PDT 2016


Updated in r264318.

I’ve got an item on my todo list to overhaul that page. Not sure if you (or anyone else on the list) has opinions here, but I’d really like the main CMake page to be the documentation targeted at new users of CMake and people new to building LLVM, and I’d like to splinter off into a series of more targeted “advanced” documentation pages for more specific things.

The fundamental idea being that each page would have a clear and narrow audience so that if you’re looking for specific types of information it is easy to find it without sifting or scrolling through lots of unrelated information.

Thoughts?

-Chris


> On Mar 23, 2016, at 3:35 PM, Sean Silva <chisophugis at gmail.com> wrote:
> 
> Could you please update http://llvm.org/docs/CMake.html <http://llvm.org/docs/CMake.html>? (docs/CMake.rst)
> 
> On Wed, Mar 23, 2016 at 2:32 PM, Sean Silva <chisophugis at gmail.com <mailto:chisophugis at gmail.com>> wrote:
> Could you please update http://llvm.org/docs/CMake.html <http://llvm.org/docs/CMake.html>? (docs/CMake.rst)
> 
> 
> -- Sean Silva
> 
> On Tue, Mar 10, 2015 at 1:48 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote:
> Author: cbieneman
> Date: Tue Mar 10 15:48:02 2015
> New Revision: 231842
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=231842&view=rev <http://llvm.org/viewvc/llvm-project?rev=231842&view=rev>
> Log:
> Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a release tablegen build when LLVM is configured with assertions enabled.
> 
> Summary: This change leverages the cross-compiling functionality in the build system to build a release tablegen executable for use during the build.
> 
> Reviewers: resistor, rnk
> 
> Reviewed By: rnk
> 
> Subscribers: rnk, joker.eph, llvm-commits
> 
> Differential Revision: http://reviews.llvm.org/D7349 <http://reviews.llvm.org/D7349>
> 
> Modified:
>     llvm/trunk/CMakeLists.txt
>     llvm/trunk/cmake/modules/TableGen.cmake
> 
> Modified: llvm/trunk/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=231842&r1=231841&r2=231842&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=231842&r1=231841&r2=231842&view=diff>
> ==============================================================================
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Tue Mar 10 15:48:02 2015
> @@ -350,6 +350,11 @@ if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT)
>    set(DISABLE_LLVM_DYLIB_ATEXIT 1)
>  endif()
> 
> +option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
> +if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS))
> +  set(LLVM_USE_HOST_TOOLS ON)
> +endif()
> +
>  # All options referred to from HandleLLVMOptions have to be specified
>  # BEFORE this include, otherwise options will not be correctly set on
>  # first cmake run
> @@ -536,9 +541,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
>  include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})
> 
>  # when crosscompiling import the executable targets from a file
> -if(CMAKE_CROSSCOMPILING)
> +if(LLVM_USE_HOST_TOOLS)
>    include(CrossCompile)
> -endif(CMAKE_CROSSCOMPILING)
> +endif(LLVM_USE_HOST_TOOLS)
> 
>  if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD )
>    # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
> 
> Modified: llvm/trunk/cmake/modules/TableGen.cmake
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=231842&r1=231841&r2=231842&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=231842&r1=231841&r2=231842&view=diff>
> ==============================================================================
> --- llvm/trunk/cmake/modules/TableGen.cmake (original)
> +++ llvm/trunk/cmake/modules/TableGen.cmake Tue Mar 10 15:48:02 2015
> @@ -91,7 +91,7 @@ macro(add_tablegen target project)
>    # Effective tblgen executable to be used:
>    set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN} PARENT_SCOPE)
> 
> -  if(CMAKE_CROSSCOMPILING)
> +  if(LLVM_USE_HOST_TOOLS)
>      if( ${${project}_TABLEGEN} STREQUAL "${target}" )
>        set(${project}_TABLEGEN_EXE "${LLVM_NATIVE_BUILD}/bin/${target}")
>        set(${project}_TABLEGEN_EXE ${${project}_TABLEGEN_EXE} PARENT_SCOPE)
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160324/884ab2d7/attachment.html>


More information about the llvm-commits mailing list