[PATCH] D74588: Make TableGenGlobalISel an object library
Aaron Puchert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 31 13:09:24 PDT 2021
aaronpuchert added a comment.
In D74588#2662002 <https://reviews.llvm.org/D74588#2662002>, @aaronpuchert wrote:
> In D74588#2661735 <https://reviews.llvm.org/D74588#2661735>, @beanz wrote:
>
>> diff --git a/llvm/unittests/TableGen/CMakeLists.txt b/llvm/unittests/TableGen/CMakeLists.txt
>> --- a/llvm/unittests/TableGen/CMakeLists.txt
>> +++ b/llvm/unittests/TableGen/CMakeLists.txt
>> -target_link_libraries(TableGenTests PRIVATE LLVMTableGenGlobalISel LLVMTableGen)
>> +target_link_libraries(TableGenTests PRIVATE LLVMTableGen)
>
> I think we can also drop `LLVMTableGen` since it's in `LLVM_LINK_COMPONENTS` already?
Apparently this doesn't work with `LLVM_LINK_LLVM_DYLIB=ON`, I get errors like `undefined symbol: llvm::PrintWarning(llvm::ArrayRef<llvm::SMLoc>, llvm::Twine const&)`. These are from `TableGen`, and indeed `libLLVMTableGen.a` is not linked into `libLLVM.so` (llvm/tools/llvm-shlib/CMakeLists.txt):
# Exclude libLLVMTableGen for the following reasons:
# - it is only used by internal *-tblgen utilities;
# - it pollutes the global options space.
list(REMOVE_ITEM LIB_NAMES "LLVMTableGen")
and `TableGenTests` is only linked with gtest and the latter. This seems like we shouldn't replace `LLVMTableGen` with `LLVM` if the latter doesn't provide the former. But that's for another change, I'll go with your proposed patch that keeps the explicit link to `TableGen`for now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74588/new/
https://reviews.llvm.org/D74588
More information about the llvm-commits
mailing list