1

I have just successfully built llvm, clang and lld on msvc build tool 2017 with windows 10 sdk.

I tried to build libcxx next.

While I was doing cmake/ninja (with clang-cl of newly built clang), I got this:

CMake Error at test/CMakeLists.txt:72 (include):
  include could not find load file:

    AddLLVM


CMake Error at test/CMakeLists.txt:74 (configure_lit_site_cfg):
  Unknown CMake command "configure_lit_site_cfg".


-- Configuring incomplete, errors occurred!

I did also pass this parameter to cmake

-DLLVM_PATH="C:/llvm"

Is this because I built llvm wrong?


UPDATE

I already fixed this by

-DCMAKE_MODULE_PATH="C:/llvm-master/cmake/modules

sandthorn
  • 2,770
  • 1
  • 15
  • 59
  • Hi, I have been trying to build clang using cmake and I am getting a similar error except it is not able to load file AddClang.. Where can I specify the path to AddClang? – Tehreem Dec 11 '18 at 01:52
  • @Tehreem That's weird. I never confronted that error. Well, as `AddLLM` is a module part of `llvm`'s own cmake, `AddClang` is likewise the same thing ==> [here](https://github.com/llvm-mirror/clang/tree/master/cmake/modules). I guess you can just add that path to CMAKE_MODULE_PATH. – sandthorn Dec 12 '18 at 05:33
  • I checked out everything again and performed a clean build. Things are fine now so I must have missed some step earlier. However, I am facing new issues, Can you help me with this? https://stackoverflow.com/q/53736152/1430961 – Tehreem Dec 12 '18 at 05:42

0 Answers0