[LLVMdev] Using C++'11 language features in LLVM itself
Brooks Davis
brooks at freebsd.org
Fri Jan 11 08:35:33 PST 2013
On Fri, Jan 11, 2013 at 08:02:22AM -0500, Justin Holewinski wrote:
> Alright, trying to get this conversation back on track...
>
> It seems as though the question to ask is: do the benefits of the C++11
> features we want outweigh the cost of alienating users of older compilers?
> For Mac, the question seems almost moot since clang is a fully-supported
> compiler. On Linux, it is most often (always?) possible to bootstrap clang
> or a newer GCC, so a baseline like 4.5/4.6 does not seem unreasonable.
> Seems like the same should be true for the BSDs. It may be a bit of work
> to set up, but it should be a one-time deal. Once a clang 3.1/3.2 binary
> is available, all is well. The problem child, so to speak, is Windows. I
> strongly suggest that support for MSVC *not* be dropped. There are many
> users out there relying on this support. That said, I think MSVC 2010 is a
> reasonable target, at least for 3.3. And then perhaps move to MSVC 2012
> for 3.4. That should allow for enough time for users to upgrade.
It's a bit more complex for FreeBSD (and probably the others) due to
assumptions in our build system.
If a version of LLVM does not compile with gcc 4.2.1 then the previous
release will be the last version in the FreeBSD 9.x branch. That
branch should last at least another three years. It is possible that
FreeBSD 10.x (release probably a year away) could require a more modern
compiler, but there are a number of build system change that would be
required to make bootstrapping reasonably smooth. Right now we'd
have to force anyone building on a non-x86 platform to install an
external toolchain since clang 3.2 doesn't yet reliably target anything
else for us.
When you do move forward with C++11 features, it would be helpful if
you made a long term commitment to limiting the feature set to those
features in 3.2 or whatever ever release is the last with the current
feature set. That way we can be assured that FreeBSD 9.<latest> users
can build 10.x which is something we've guaranteed for a very long time.
There will certainly be some fallout if we remove support for building
from 8.x and 7.x without installing extra tools, but I think that will
be manageable.
Requiring C++11 library support would really hurt since we don't build
it by default on 9. We could probably fix for at least x86 that, but it
won't be trivial.
From my perspective, I'd prefer to see one more llvm release that builds
with gcc 4.2.1 because we've very close to having ARM be self-hosting and
having that on 9 would be a good thing.
-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130111/4185bf77/attachment.sig>
More information about the llvm-dev
mailing list