[llvm-dev] Failing compiler-rt LTO test

David Greene via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 9 13:08:05 PDT 2018


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

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


More information about the llvm-dev mailing list