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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to