[PATCH] D92376: [llvm-link] use file magic when deciding if input should be loaded as archive
Sergey Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 02:45:31 PST 2020
sdmitriev created this revision.
sdmitriev added reviewers: jdoerfert, jsjodin, gregrodgers, RaviNarayanaswamy.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
sdmitriev requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92376
Files:
llvm/test/tools/llvm-link/archive-bad.ll
llvm/test/tools/llvm-link/archive.ll
llvm/tools/llvm-link/llvm-link.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92376.308595.patch
Type: text/x-patch
Size: 5331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201201/6da8c625/attachment.bin>
More information about the llvm-commits
mailing list