[all-commits] [llvm/llvm-project] f74181: [lld][ELF] Fix lazy ThinLTO index writing in thin ...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Wed Oct 5 10:12:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f741815ddb49e3ed26de327a51ccf60f66f21d46
      https://github.com/llvm/llvm-project/commit/f741815ddb49e3ed26de327a51ccf60f66f21d46
  Author: Aiden Grossman <agrossmn154 at yahoo.com>
  Date:   2022-10-05 (Wed, 05 Oct 2022)

  Changed paths:
    M lld/ELF/LTO.cpp
    A lld/test/ELF/lto/thinlto-emit-index-thin-archive.ll
    R lld/test/ELF/lto/thinlto-thin-archive-collision.ll

  Log Message:
  -----------
  [lld][ELF] Fix lazy ThinLTO index writing in thin archives

Currently when the --thinlto-emit-index-files is used with LLD and a
thin archive is passed containing references to object files to link
against where the object files are in a different folder than the thin
archive and some of the archives aren't linked against (ie stay lazy),
the empty index file writer ends up trying to write to a path that
doesn't exist. This patch changes the behavior of that function to use
the path of the obj member of the BitcodeFile object rather than just
the path of the BitcodeFile object itself, which matches the behavior of
the default (non-lazy) case.

Fixes #57963

Regression test added.

Reviewed By: MaskRay

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




More information about the All-commits mailing list