Hi mclow.lists, danalbert, jroelofs,
Remove -nostdinc++ from the CMAKE_CXX_FLAGS and add it to the library specific
compile flags so that it doesn't get passed to the linker.
http://reviews.llvm.org/D6258
Files:
lib/CMakeLists.txt
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -51,6 +51,13 @@
# Setup flags.
append_if(compile_flags LIBCXX_HAS_FPIC_FLAG -fPIC)
+# If -nostdinc++ is present, then remove it from CMAKE_CXX_FLAGS and
+# move it to compile_flags so that it doesn't get passed to the linker
+# and cause an unused flag warning.
+if (LIBCXX_HAS_NOSTDINCXX_FLAG)
+ list(APPEND compile_flags -nostdinc++)
+ string(REPLACE "-nostdinc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+endif()
append_if(link_flags LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
if ( APPLE )
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits