[libcxx] r215186 - Fix re-building in-tree libc++ against in-tree libc++abi

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Aug 7 23:53:31 PDT 2014


Author: vkutuzov
Date: Fri Aug  8 01:53:30 2014
New Revision: 215186

URL: http://llvm.org/viewvc/llvm-project?rev=215186&view=rev
Log:
Fix re-building in-tree libc++ against in-tree libc++abi
Differential Revision: http://reviews.llvm.org/D4805

Modified:
    libcxx/trunk/CMakeLists.txt
    libcxx/trunk/test/lit.site.cfg.in

Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=215186&r1=215185&r2=215186&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Fri Aug  8 01:53:30 2014
@@ -45,15 +45,18 @@ option(LIBCXX_ENABLE_SHARED "Build libc+
 option(LIBCXX_INSTALL_SUPPORT_HEADERS "Install libc++ support headers." ON)
 
 set(CXXABIS none libcxxabi libcxxrt libstdc++ libsupc++)
-if (NOT DEFINED LIBCXX_CXX_ABI)
-  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
-    set(LIBCXX_CXX_ABI "libcxxabi")
+if (NOT LIBCXX_CXX_ABI)
+  if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
+      IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
+    set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
     set(LIBCXX_LIBCXXABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
     set(LIBCXX_CXX_ABI_INTREE 1)
   else ()
-    set(LIBCXX_CXX_ABI "none")
+    set(LIBCXX_CXX_ABI_LIBNAME "none")
   endif ()
-endif()
+else ()
+  set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
+endif ()
 set(LIBCXX_CXX_ABI "${LIBCXX_CXX_ABI}" CACHE STRING
     "Specify C++ ABI library to use." FORCE)
 set_property(CACHE LIBCXX_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
@@ -134,13 +137,13 @@ macro(setup_abi_lib abipathvar abidefine
     )
 endmacro()
 
-if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++" OR
-    "${LIBCXX_CXX_ABI}" STREQUAL "libsupc++")
+if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
+    "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++")
   set(_LIBSUPCXX_INCLUDE_FILES
     cxxabi.h bits/c++config.h bits/os_defines.h bits/cpu_defines.h
     bits/cxxabi_tweaks.h bits/cxxabi_forced.h
     )
-  if ("${LIBCXX_CXX_ABI}" STREQUAL "libstdc++")
+  if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++")
     set(_LIBSUPCXX_DEFINES "-DLIBSTDCXX")
     set(_LIBSUPCXX_LIBNAME stdc++)
   else()
@@ -151,7 +154,7 @@ if ("${LIBCXX_CXX_ABI}" STREQUAL "libstd
     "-D__GLIBCXX__ ${_LIBSUPCXX_DEFINES}"
     "${_LIBSUPCXX_LIBNAME}" "${_LIBSUPCXX_INCLUDE_FILES}" "bits"
     )
-elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxabi")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
   if (LIBCXX_CXX_ABI_INTREE)
     # Link against just-built "cxxabi" target.
     set(CXXABI_LIBNAME cxxabi)
@@ -162,11 +165,11 @@ elseif ("${LIBCXX_CXX_ABI}" STREQUAL "li
   setup_abi_lib("LIBCXX_LIBCXXABI_INCLUDE_PATHS" ""
     ${CXXABI_LIBNAME} "cxxabi.h" ""
     )
-elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
+elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt")
   setup_abi_lib("LIBCXX_LIBCXXRT_INCLUDE_PATHS" "-DLIBCXXRT"
     "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""
     )
-elseif (NOT "${LIBCXX_CXX_ABI}" STREQUAL "none")
+elseif (NOT "${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "none")
   message(FATAL_ERROR
     "Currently libstdc++, libsupc++, libcxxabi, libcxxrt and none are "
     "supported for c++ abi."

Modified: libcxx/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.site.cfg.in?rev=215186&r1=215185&r2=215186&view=diff
==============================================================================
--- libcxx/trunk/test/lit.site.cfg.in (original)
+++ libcxx/trunk/test/lit.site.cfg.in Fri Aug  8 01:53:30 2014
@@ -5,7 +5,7 @@ config.libcxx_src_root       = "@LIBCXX_
 config.libcxx_obj_root       = "@LIBCXX_BINARY_DIR@"
 config.python_executable     = "@PYTHON_EXECUTABLE@"
 config.enable_shared         = @LIBCXX_ENABLE_SHARED@
-config.cxx_abi               = "@LIBCXX_CXX_ABI@"
+config.cxx_abi               = "@LIBCXX_CXX_ABI_LIBNAME@"
 
 # Let the main config do the real work.
 lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")





More information about the cfe-commits mailing list