[LLVMbugs] [Bug 20395] New: argument unused during compilation: '-stdlib=libc++'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 22 01:53:27 PDT 2014


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: unassignedbugs at nondot.org
          Reporter: oroppas at gmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140722/6b9f546b/attachment.html>


More information about the llvm-bugs mailing list