[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.
Francesco Petrogalli via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 12 01:59:54 PST 2023
fpetrogalli created this revision.
fpetrogalli added a reviewer: jrtc27.
Herald added subscribers: luismarques, s.egerton, kadircet, PkmX, arphaman, simoncook, arichardson.
Herald added a project: All.
fpetrogalli requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, MaskRay, ilya-biryukov.
Herald added a project: clang.
The header file `llvm/include/llvm/Targetparser/RISCVTargetParser.h`
relies on the auto-generated *.inc file associated to the tablegen
target `RISCVTargetParserTableGen`.
Both clangBasic and clangDriver include `RISCVTargetParser.h`,
therefore we need to make sure that the *.inc file is avaiable to
avoid compilation errors like the following:
FAILED: tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o
/usr/bin/c++ [bunch of non interesting stuff] -c <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp
In file included from <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp:19:
<path-to>/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h:29:10: fatal error: llvm/TargetParser/RISCVTargetParserDef.inc: No such file or directory
29 | #include "llvm/TargetParser/RISCVTargetParserDef.inc"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141581
Files:
clang/lib/Basic/CMakeLists.txt
clang/lib/Driver/CMakeLists.txt
Index: clang/lib/Driver/CMakeLists.txt
===================================================================
--- clang/lib/Driver/CMakeLists.txt
+++ clang/lib/Driver/CMakeLists.txt
@@ -93,7 +93,7 @@
DEPENDS
ClangDriverOptions
- RISCVTargetParserTableGen
+ LLVMTargetParser
LINK_LIBS
clangBasic
Index: clang/lib/Basic/CMakeLists.txt
===================================================================
--- clang/lib/Basic/CMakeLists.txt
+++ clang/lib/Basic/CMakeLists.txt
@@ -110,7 +110,7 @@
DEPENDS
omp_gen
- RISCVTargetParserTableGen
+ LLVMTargetParser
)
target_link_libraries(clangBasic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141581.488550.patch
Type: text/x-patch
Size: 620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230112/de5e781b/attachment.bin>
More information about the cfe-commits
mailing list