[all-commits] [llvm/llvm-project] 90af55: [LLD][ELF] Use offset in thin archives to disambig...

Hongtao Yu via All-commits all-commits at lists.llvm.org
Fri May 15 12:03:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 90af55d8a972b268d1b30feec8fb407ca856e110
      https://github.com/llvm/llvm-project/commit/90af55d8a972b268d1b30feec8fb407ca856e110
  Author: Hongtao Yu <hoy at fb.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    A lld/test/ELF/lto/thinlto-thin-archive-collision.ll
    M lld/test/ELF/lto/thinlto.ll

  Log Message:
  -----------
  [LLD][ELF] Use offset in thin archives to disambiguate thinLTO members

This is fixing a thinLTO module collision issue for thin archives. The problem is that we always use a zero offset to name members in a thin archive and that causes the following build error:

    ld.lld: error: Expected at most one ThinLTO module per bitcode file

which happens to a thin archive that has two members with the same object file name (whose paths will be ignored by thinLTO driver)

The fix here is to use real member offset instead as is done for non-thin archives.

Differential Revision: https://reviews.llvm.org/D79880




More information about the All-commits mailing list