[all-commits] [llvm/llvm-project] 715ba1: [llvm-link] use file magic when deciding if input ...

Sergey Dmitriev via All-commits all-commits at lists.llvm.org
Wed Dec 2 17:39:03 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 715ba18d3e11bc3636a9d0f701d8e5a2fdf66852
      https://github.com/llvm/llvm-project/commit/715ba18d3e11bc3636a9d0f701d8e5a2fdf66852
  Author: Sergey Dmitriev <serguei.n.dmitriev at intel.com>
  Date:   2020-12-02 (Wed, 02 Dec 2020)

  Changed paths:
    M llvm/test/tools/llvm-link/archive-bad.ll
    M llvm/test/tools/llvm-link/archive.ll
    M llvm/tools/llvm-link/CMakeLists.txt
    M llvm/tools/llvm-link/llvm-link.cpp

  Log Message:
  -----------
  [llvm-link] use file magic when deciding if input should be loaded as archive

llvm-link should not rely on the '.a' file extension when deciding if input file
should be loaded as archive. Archives may have other extensions (f.e. .lib) or no
extensions at all. This patch changes llvm-link to use llvm::file_magic to check
if input file is an archive.

Reviewed By: RaviNarayanaswamy

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




More information about the All-commits mailing list