[cfe-commits] [PATCH] [libcxx][CMake] Add initial support for selecting a specific c++ abi to use.
Chandler Carruth
chandlerc at gmail.com
Wed Nov 28 19:14:51 PST 2012
================
Comment at: CMakeLists.txt:79-92
@@ +78,16 @@
+ set(LIBCXX_LIBSUPCXX_FILE_PATHS)
+ foreach(file ${LIBCXX_LIBSUPCXX_FILES})
+ set(found FALSE)
+ foreach(incpath ${LIBCXX_LIBSUPCXX_INCLUDE_PATHS})
+ if (EXISTS "${incpath}/${file}")
+ set(found TRUE)
+ get_filename_component(dstdir ${file} PATH)
+ file(COPY "${incpath}/${file}"
+ DESTINATION "${CMAKE_BINARY_DIR}/include/${dstdir}")
+ endif()
+ endforeach()
+ if (NOT found)
+ message(FATAL_ERROR "Failed to find ${file}")
+ endif()
+ endforeach()
+ include_directories("${CMAKE_BINARY_DIR}/include")
----------------
This is really gross. It happens at cmake time, not at build time. =[ Is there a way to instead trigger this as part of the build? Notably, so it will re-copy of the source files change?
================
Comment at: lib/CMakeLists.txt:35
@@ -34,2 +34,3 @@
# Generate library list.
+set(libraries ${LIBCXX_CXX_ABI_LIBRARIES})
append_if(libraries LIBCXX_HAS_PTHREAD_LIB pthread)
----------------
Why not use append_if for each line? Was the old code just broken?
================
Comment at: src/exception.cpp:44
@@ -43,3 +43,3 @@
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)
+#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
----------------
Why is this required? Separate commit?
http://llvm-reviews.chandlerc.com/D82
More information about the cfe-commits
mailing list