[PATCH] D69003: [dsymutil] Add ${system_libs} to target link libraries
Gokturk Yuksek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 15:06:32 PDT 2019
gokturk added a comment.
In D69003#1721908 <https://reviews.llvm.org/D69003#1721908>, @beanz wrote:
> You don't need to add the library to `dsymutil`. It is not code in `dsymutil` that depends on `libatomic`, it is code in `LLVMSupport` that `dsymutil` is using. By fixing this in `LLVMSupport`, any library linked against `LLVMSupport` will have a linkage to `libatomic` added.
>
> Please don't spend 20 hours testing this patch. I'm very pretty sure this isn't the correct fix.
dsymutil makes explicit use of libatomic (https://github.com/llvm/llvm-project/blob/release/9.x/llvm/tools/dsymutil/dsymutil.cpp#L542):
std::atomic_char AllOK(1);
...
auto LinkLambda = [&,
OutputFile](std::shared_ptr<raw_fd_ostream> Stream) {
AllOK.fetch_and(linkDwarf(*Stream, BinHolder, *Map, *OptionsOrErr));
Stream->flush();
if (Verify && !NoOutput)
AllOK.fetch_and(verify(OutputFile, Map->getTriple().getArchName()));
};
Doesn't this create a link time dependency on libatomic?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69003/new/
https://reviews.llvm.org/D69003
More information about the llvm-commits
mailing list