[PATCH] D25431: [libcxx] [CMake] Build Solaris compat as separate C lib, to avoid -std= issues
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 05:56:24 PDT 2016
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25431.74119.patch
Type: text/x-patch
Size: 555 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161010/8443d874/attachment-0001.bin>
More information about the cfe-commits
mailing list