mgorny created this revision.
mgorny added reviewers: EricWF, theraven.
mgorny added a subscriber: cfe-commits.
Herald added a subscriber: beanz.

Build the Solaris compatibility code (C) as a separate static library
rather than appending it to libc++ sources, in order to prevent
the -std=c++11 flag from being used for C code as it causes build
failure with clang.


https://reviews.llvm.org/D25431

Files:
  lib/CMakeLists.txt


Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -7,7 +7,8 @@
   list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
   file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.c)
-  list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES})
+  add_library(libcxx_solaris_compat STATIC ${LIBCXX_SOLARIS_SOURCES})
+  add_library_flags(libcxx_solaris_compat)
 endif()
 
 # Add all the headers to the project for IDEs.


Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -7,7 +7,8 @@
   list(APPEND LIBCXX_SOURCES ${LIBCXX_WIN32_SOURCES})
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
   file(GLOB LIBCXX_SOLARIS_SOURCES ../src/support/solaris/*.c)
-  list(APPEND LIBCXX_SOURCES ${LIBCXX_SOLARIS_SOURCES})
+  add_library(libcxx_solaris_compat STATIC ${LIBCXX_SOLARIS_SOURCES})
+  add_library_flags(libcxx_solaris_compat)
 endif()
 
 # Add all the headers to the project for IDEs.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to