llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.15k stars 11.12k forks source link

llvm/include/llvm/Config/llvm-config.h and clang/AST/DeclNodes.inc missing #58260

Open Leon-Zhang opened 1 year ago

Leon-Zhang commented 1 year ago

I have been using cmake gui

(LLVM_ENABLE_PROJECTS="clang;lldb;clang-tools-extra")

to generate sln build file, it can compile, but llvm-config.h file is not generated (from llvm/Config/llvm-config.h.cmake); Also tried to include clang frontend and matcher headers, but gives inc file not found:

Error   C1083   Cannot open include file: 'clang/AST/DeclNodes.inc': No such file or directory
clang\include\clang\AST\ASTFwd.h    21

how to fix this? Thanks.

Leon-Zhang commented 1 year ago

Double checked, "llvm\include\llvm\Config\llvm-config.h.cmake" "llvm\include\llvm\Config\abi-breaking.h.cmake" "llvm\include\llvm\Config\config.h.cmake"

Above 3 cmake file suppose to generate(process by llvm\utils\gn\build\write_cmake_config.py) corresponding header file while it did not.

Leon-Zhang commented 1 year ago

Update: I am able to build in command line mode, seems missing files mentioned above are been produced by following command cmake -DCMAKE_INSTALL_PREFIX=/e/ProgramFiles/llvm -DCMAKE_INSTALL_CONFIG_NAME=Debug -P cmake_install.cmake

But from cmake gui, seems there is no gui interface to execute such command.

PavelKotov1 commented 1 year ago

Hello, dear friends! I am having similar problem in llvm 16.02: llvm-config.h header file is missing in the include\Config folder. There is llvm-config.h.cmake file present, but I am very new to cmake and cannot figure out how to produce llvm-config.h using the command from the previous post by Leon-Zhang [on Oct 21, 2022]. Could somebody be so nice and kind and explain how to produce the needed header by giving me detailed possibly step by step instructions. With kind regards, Pavel Kotov.