clang-highlight icon indicating copy to clipboard operation
clang-highlight copied to clipboard

Assistance with compilation, missing `FuzzyNodes.td`?

Open michael-go opened this issue 4 years ago • 0 comments

Hi 👋

Looking into the CMakeLists.txt & Makefile I understand that to build this, the root of this repo should be added as a subfolder under llvm-project/clang/tools, and added it to the CMakeLists.txt inside tools, right?

After some other small changes in the CMakeLists.txt of clang-highlight to make CMake happy, it complains that the file FuzzyNodes.td is missing:

CMake Error at ..../llvm-project/llvm/cmake/modules/AddLLVM.cmake:454 (add_library):
  Cannot find source file:

    FuzzyNodes.td

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  /home/michael_snyk_io/tmp/llvm-project/clang/cmake/modules/AddClang.cmake:103 (llvm_add_library)
  /home/michael_snyk_io/tmp/llvm-project/clang/tools/clang-highlight/Fuzzy/CMakeLists.txt:7 (add_clang_library)

Seems this file is indeed missing, and if I try to remove the dependency on it from Fuzzy/CMakeLists.txt it proceeds further but fails with compilation errors like:

llvm-project/clang/tools/clang-highlight/ClangHighlight.cpp:51:16: error: ‘clEnumValEnd’ was not declared in this scope; did you mean ‘clEnumValN’?
   51 |                clEnumValEnd),
      |                ^~~~~~~~~~~~
      |                clEnumValN

And I guess that's missing some definitions from the FuzzeNode.td file?

Thanks 🙏

michael-go avatar Jan 24 '21 10:01 michael-go