[llvm-bugs] [Bug 48547] New: LLD as a library behaves incorrectly about exiting
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 17 11:56:46 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48547
Bug ID: 48547
Summary: LLD as a library behaves incorrectly about exiting
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: dpldobrev at protonmail.com
CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com
lld is explicitly documented as invokable as a library at https://lld.llvm.org/
:
"You can embed LLD in your program to eliminate dependencies on external
linkers. All you have to do is to construct object files and command line
arguments just like you would do to invoke an external linker and then call the
linker’s main function, lld::elf::link, from your code."
However, using this method requires passing a Boolean parameter for exiting. If
it's true, the entire process dies right away. If it's false, it's left hanging
unless llvm::llvm_shutdown() is manually called. This isn't the proper
behaviour of a library as the calls should just to the job and not have the
caller handle such details.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201217/5381193d/attachment-0001.html>
More information about the llvm-bugs
mailing list