On 18 December 2015 at 18:13, Alexey Samsonov <vonos...@gmail.com> wrote: > samsonov added a comment. > > In http://reviews.llvm.org/D15598#314127, @rafael wrote: > >> I am not sure what is "expected" is here: > > > Interesting. > I was assuming that Clang tends to understand "-lstdc++" as a special > argument that says "link against C++ standard library", not "link against > libstdc++.{a,so}". > For instance, > > clang a.cc -lstdc++ -stdlib=libc++ > > will effectively replace "-lstdc++" with "-lc++", and > > clang++ a.cc -stdlib=libc++ -static-libstdc++ > > will link against libc++ statically. In that sense, it makes sense to assume > that "-static-libstdc++" will bind to "-lstdc++" argument. > > Apparently, it's not what GCC does :( Do you think we should keep being > compatible here?
My preference would be for -lstdc++ to be as least special as possible. Do you know why -stdlib=libc++ is not a clang++ only option? Cheers, Rafael _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits