[PATCH] D140529: [RISCV][NFC] Move RISCVISAInfo back to Support
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 22 23:29:23 PST 2022
pcwang-thead added a comment.
@craig.topper Thanks!
If we want to use `RISCVISAInfo` in `RISCVTargetDefEmitter.cpp`, we need to add `TargetParser` component to `llvm/utils/TableGen/CMakeLists.txt`:
diff --git a/llvm/utils/TableGen/CMakeLists.txt b/llvm/utils/TableGen/CMakeLists.txt
index aa16e7e894ac..987b955655e3 100644
--- a/llvm/utils/TableGen/CMakeLists.txt
+++ b/llvm/utils/TableGen/CMakeLists.txt
@@ -1,6 +1,6 @@
add_subdirectory(GlobalISel)
-set(LLVM_LINK_COMPONENTS Support)
+set(LLVM_LINK_COMPONENTS Support TargetParser)
add_tablegen(llvm-tblgen LLVM
DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
This causes CMake errors like:
[cmake] CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
[cmake] "llvm-tblgen" of type EXECUTABLE
[cmake] depends on "LLVMTargetParser" (weak)
[cmake] "RISCVTargetParserTableGen" of type UTILITY
[cmake] depends on "llvm-tblgen" (strong)
[cmake] "LLVMTargetParser" of type STATIC_LIBRARY
[cmake] depends on "RISCVTargetParserTableGen" (strong)
[cmake] At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries.
So I move `RISCVISAInfo.cpp` back to `Support` component to avoid this cyclic dependency.
@fpetrogalli
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140529/new/
https://reviews.llvm.org/D140529
More information about the llvm-commits
mailing list