On Wed, May 30, 2018 at 5:02 PM, Anthony Jones <ajo...@mozilla.com> wrote:

> On Thursday, 31 May 2018 02:44:51 UTC+12, Tom Ritter  wrote:
> > Oh.  Are we doing this rustc inlining development on a particular old
> > version of clang?  I'm not even close to getting CFI ready but I'm
> > basically working off llvm trunk as I'm finding and filing llvm bugs
> > and working with llvm devs to get them fixed....
>
> We don't have experience with cross language LTO. It is difficult to
> predict but relatively easy to try. Here's what we do know:
>
> In order for the linker to do LTO, it needs to be able to understand the
> llvm-ir from both clang and rustc. For the most part this means having an
> lld verison more recent than the compilers. In theory the newer linker can
> read old versions of llvm-ir. Unfortunately llvm-ir changes over time and
> while some effort goes into making it backward compatible, it seems
> reasonable to expect a large gap between clang and rustc versions may fall
> short of excellence.
>
> We may be able to get away with heterogenous clang/rustc/lld versions, but
> it may be more trouble than it is worth. Alternatively we may need to keep
> rustc/clang/lld in lock step with all that it entails. It is possible that
> in the end we decide the whole thing isn't worth the trouble. Time will
> tell.
>

LLVM has this policy on IR backwards compatibility:
https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility

In short, newer compiler versions can be expected to read and compile older
IRs going back to LLVM 3.0 correctly, while fewer guarantees exist to keep
debug info working.  All backwards incompatible changes are required to be
recorded in
https://github.com/llvm-mirror/llvm/blob/master/test/Bitcode/compatibility.ll
(and its versioned counterparts in the same directory) per each release.

Per this policy, as long as our LLVM toolchain comes from the same major
release we should be mostly fine, except for occasional bugs.

Cheers,
-- 
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to