[llvm-dev] "-stdlib=libc++" applied to CMAKE_CXX_FLAGS

Brian Cain via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 17 15:09:38 PST 2016


llvm/cmake/modules/HandleLLVMStdlib.cmake specifies "-stdlib=libc++" for
CMAKE_CXX_FLAGS when LLVM_ENABLE_LIBCXX and CXX_SUPPORTS_STDLIB.  From what
I can see this is a flag intended for the linker and not the compiler.

 

I'd like to submit a change to delete CMAKE_CXX_FLAGS from this append() but
I wanted to check in with the list to see if that makes sense or if there
are other contexts for which "stdlib=libc++" might be used.

 

If I specify "-nostdinc++", "-stdlib=libc++" doesn't get consumed and clang
emits a warning. 

 

$ clang++ -nostdinc++ -stdlib=libc++ -o main.o -c main.cpp

clang-4.0: warning: argument unused during compilation: '-stdlib=libc++'
[-Wunused-command-line-argument]

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161117/55ff4059/attachment.html>


More information about the llvm-dev mailing list