[llvm-dev] Failing compiler-rt LTO test
Teresa Johnson via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 11 11:20:04 PDT 2018
On Mon, Jul 9, 2018 at 1:08 PM David Greene via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi,
>
> I'm trying to build clang/LLVM and am hitting a test failure in
> compiler-rt/test/safestack/lto.c.
>
> I believe the issue is that we've configured clang to use ld.bfd as the
> linker. ld.bfd has plugin support as described here:
>
> https://llvm.org/docs/GoldPlugin.html
I didn't even realize that that doc indicated support for ld.bfd. Looks
like the change was made in June 2017, without any associated review. I
need to revert at least part of the patch, as it actually removed some
instructions for building gold with plugins enabled, and replaced it with
instructions for ld.bfd.
Adding Davide, who commented on the associated bug, for thoughts:
https://bugs.llvm.org/show_bug.cgi?id=32760.
Also looking for comments from others in the community who may have more
history or experience on the gold plugin interactions with ld.bfd.
My understanding in the past is that we didn't officially support using the
llvm gold plugin with ld.bfd. We don't have any bots that test that
combination (which is why you see the code below in lit.common.cfg). In my
mind, that means using the llvm gold plugin with ld.bfd is at your own risk
(and therefore I would like to remove the wording around using ld.bfd from
the above doc, or at least add that disclaimer).
Can you use gold or lld instead?
Teresa
>
> compiler-rt/test/lit.common.cfg isn't set up to know about ld.bfd:
>
> elif config.host_os == 'Linux' and is_linux_lto_supported():
> config.lto_supported = True
> config.lto_launch = []
> if config.use_lld:
> config.lto_flags = ["-fuse-ld=lld"]
> else:
> config.lto_flags = ["-fuse-ld=gold"]
>
> The test ends up passing -fuse-ld=gold and clang barfs.
>
> It seems to me the correct thing to do is update lit.common.cfg to
> support ld.bfd but I'm not sure exactly how to do that. I can't find
> where "config" is defined. I think we'd want a config.use_bfd or
> something. Maybe a config.use_gold as well for good measure.
>
> Thoughts?
>
> -David
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
--
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180711/9a6909af/attachment.html>
More information about the llvm-dev
mailing list