Note that we could, in theory, provide a python script or something called `bootstrap.py` which a) downloads a source tarball, or specific git revision for a particular clang release b) compiles it using system compiler c) installs it d) cleans up so that you wouldn't have to do anything manually. The script could early-out if it detects a recent enough compiler version so that bootstrapping was unnecessary. I think this would hide much of the complexity about having to deal with getting a modern toolchain, so that the workflow would be: 1) check out LLVM ToT 2) run bootstrap.py 3) build -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/bf09e242/attachment.html>
On Tue, Oct 31, 2017 at 2:11 PM, Zachary Turner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Note that we could, in theory, provide a python script or something called > `bootstrap.py` which > > a) downloads a source tarball, or specific git revision for a particular > clang release > b) compiles it using system compiler > c) installs it > d) cleans up >I'd guess that we could do this two-stage bootstrapping automatically using cmake when cmake finds that the host compiler is too old to compile our compiler. (And you don't need to install your compiler -- you can just copy it to some subdirectory in a build directory.) so that you wouldn't have to do anything manually. The script could> early-out if it detects a recent enough compiler version so that > bootstrapping was unnecessary. I think this would hide much of the > complexity about having to deal with getting a modern toolchain, so that > the workflow would be: > > 1) check out LLVM ToT > 2) run bootstrap.py > 3) build > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171031/db8addc7/attachment.html>
> On Oct 31, 2017, at 2:11 PM, Zachary Turner via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Note that we could, in theory, provide a python script or something called `bootstrap.py` which > > a) downloads a source tarball, or specific git revision for a particular clang release > b) compiles it using system compiler > c) installs it > d) cleans up > > so that you wouldn't have to do anything manually.I love that you’re pushing hard on this, but I don’t think that this approach is practical. While I love the future where everything is built with ToT clang, there are lots of reason why people either don’t want to do that (e.g. for “subjectively" bad reasons) or where they really can’t (e.g. clang doesn’t support their weird target). -Chris
I’m ok with that, but the reason I’m pushing is because there is no clear plan of action. Even if the plan of action is “When X happens, we can enable C++14”, that’s fine too. I just want to know, concretely, what is X. We should either be able to say never or give a reasonable set of conditions that would enable a switch. All I’ve seen though is “it’s hard” which just means I’m going to ask again next year, and the year after, etc due to lack of clear guidance. To address your point though , this isn’t really about building everything with clang. You don’t need to bootstrap Clang to build a hypothetical C++17 enabled LLVM, you could also bootstrap a more modern version of GCC. This is really more fundamentally about “Can we have a clearly defined policy about how often we can bump the minimum compiler version, like we have for MSVC?” On Tue, Oct 31, 2017 at 10:30 PM Chris Lattner <clattner at nondot.org> wrote:> > > On Oct 31, 2017, at 2:11 PM, Zachary Turner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Note that we could, in theory, provide a python script or something > called `bootstrap.py` which > > > > a) downloads a source tarball, or specific git revision for a particular > clang release > > b) compiles it using system compiler > > c) installs it > > d) cleans up > > > > so that you wouldn't have to do anything manually. > > I love that you’re pushing hard on this, but I don’t think that this > approach is practical. While I love the future where everything is built > with ToT clang, there are lots of reason why people either don’t want to do > that (e.g. for “subjectively" bad reasons) or where they really can’t (e.g. > clang doesn’t support their weird target). > > -Chris > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171101/ce9b8046/attachment.html>