[cfe-dev] Setting default dialect to C++11

Alan Mimms via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 28 09:16:00 PDT 2017


I'm sorry I don't read this mailing list as email, so I can't easily reply to a thread. The thread where you folks are talking about changing default compiler standards reminded me of an idea I have had for some time.


Why not change the command line driver for the compiler to pass "-std=" value based on the "argv[0]" command name if it matches a certain pattern? Then users could just build with, e.g., "make CC=clang-std-cxx14" or "make CC=clang-std-cxx11". They clearly already have to specify clang vs gcc choice in their Makefile infrastructure. As discussed in the thread, Debian could just create a symlink for the standard they want to the clang executable and use that as the value of CC (or whatever envar) when they build packages using clang. This can be globally defined and is better than hacking up the value of something like CXXFLAGS, which varies from package to package and is hard to preset without it being overridden by package specific Makefile stuff.


If this isn't a useful idea, please excuse the interruption.


-- Mimms at F5 Networks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170828/540480d1/attachment.html>


More information about the cfe-dev mailing list