http://llvm.org/bugs/show_bug.cgi?id=20395

            Bug ID: 20395
           Summary: argument unused during compilation: '-stdlib=libc++'
           Product: libc++abi
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

libcxxabi/src/*.cpp are compiled with '-nostdinc++' and building with 
LLVM_ENABLE_LIBCXX:BOOL=ON issues the warning like

  [48/1203] Building CXX object
  projects/libcxxabi/src/CMakeFiles/cxxabi.dir/cxa_demangle.cpp.o
  clang-3.5: warning: argument unused during compilation: '-stdlib=libc++'

for all *.cpp in libcxxabi.

Simply removing '-stdlib=libc++' for compilation of libcxxabi/src/*.cpp should
fix the problem.

Index: llvm/projects/libcxxabi/CMakeLists.txt
===================================================================
--- llvm/projects/libcxxabi/CMakeLists.txt    (revision 213616)
+++ llvm/projects/libcxxabi/CMakeLists.txt    (working copy)
@@ -124,7 +124,7 @@
         ${LLVM_INCLUDE_DIR}/c++/v1
   )

-set(LIBCXXABI_LIBCXX_INCLUDES "${LIBCXXABI_LIBCXX_INCLUDES}" CACHE STRING
+set(LIBCXXABI_LIBCXX_INCLUDES "${LIBCXXABI_LIBCXX_INCLUDES}" CACHE PATH
     "Specify path to libc++ includes." FORCE)


#===============================================================================
@@ -154,6 +154,7 @@

 if (LIBCXXABI_HAS_NOSTDINCXX_FLAG)
   list(APPEND LIBCXXABI_CXX_REQUIRED_FLAGS -nostdinc++)
+  string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 endif()

 append_if(LIBCXXABI_CXX_REQUIRED_FLAGS LIBCXXABI_HAS_WERROR_FLAG
-Werror=return-type)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to