[libcxx] r214037 - Better defaults for in-tree libc++ with cmake.

Alexey Samsonov vonosmas at gmail.com
Mon Jul 28 12:36:18 PDT 2014


I've submitted r214114 as an attempt to bring back the sanitizer buildbot
(it started to fail at bootstrap stage:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/11643).


On Sat, Jul 26, 2014 at 4:08 PM, Dan Albert <danalbert at google.com> wrote:

> Author: danalbert
> Date: Sat Jul 26 18:08:33 2014
> New Revision: 214037
>
> URL: http://llvm.org/viewvc/llvm-project?rev=214037&view=rev
> Log:
> Better defaults for in-tree libc++ with cmake.
>
> This will detect if you are building libcxx in-tree and libcxxabi is
> available.  If so, it will default to using the in-tree libcxxabi by
> setting LIBCXX_CXX_ABI to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to
> "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi"
> as a proper dependency.
>
> Patch by Russell Harmon.
>
> Modified:
>     libcxx/trunk/CMakeLists.txt
>
> Modified: libcxx/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=214037&r1=214036&r2=214037&view=diff
>
> ==============================================================================
> --- libcxx/trunk/CMakeLists.txt (original)
> +++ libcxx/trunk/CMakeLists.txt Sat Jul 26 18:08:33 2014
> @@ -46,7 +46,13 @@ option(LIBCXX_INSTALL_SUPPORT_HEADERS "I
>
>  set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
>  if (NOT DEFINED LIBCXX_CXX_ABI)
> -  set(LIBCXX_CXX_ABI "none")
> +  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND IS_DIRECTORY
> "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
> +    set(LIBCXX_CXX_ABI "libcxxabi")
> +    set(LIBCXX_LIBCXXABI_INCLUDE_PATHS
> "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
> +    set(LIBCXX_CXX_ABI_INTREE 1)
> +  else ()
> +    set(LIBCXX_CXX_ABI "none")
> +  endif ()
>  endif()
>  set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
>      "Specify C++ ABI library to use." FORCE)
> @@ -149,6 +155,10 @@ elseif ("${LIBCXX_CXX_ABI}" STREQUAL "li
>    setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
>      "c++abi" "cxxabi.h" ""
>      )
> +
> +  if (LIBCXX_CXX_ABI_INTREE)
> +    add_dependencies(LIBCXX_CXX_ABI_DEPS cxxabi)
> +  endif ()
>  elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
>    setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"
>      "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140728/8e0877a3/attachment.html>


More information about the cfe-commits mailing list