[cfe-users] Choose default stdlib for clang

Oren Shpigel via cfe-users cfe-users at lists.llvm.org
Mon Jan 30 04:01:08 PST 2017


Hi,
How can I configure clang to use "-stdlib=libc++" by default instead of
libstdc++?
If it's not possible, can I compile my own version to do it?

I found a place suggested running this command to compile clang for this
purpose:
../llvm/configure CXXFLAGS="-stdlib=libc++ -std=c++11"
OBJCXXFLAGS="-stdlib=libc++
-std=c++11" LDFLAGS="-stdlib=libc++"
But I see that the autoconf build system is deprecated.
Is there a cmake alternative for that command?

Or any other way to make clang use libc++ by default?

Thanks!
Oren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20170130/b0ffa4af/attachment.html>


More information about the cfe-users mailing list