0

Trying to set the include directory path for llvm build

Hi,
I am trying to build llvm with snmalloc allocator and as per the cmake options and instructions, I have set LLVM_INTEGRATED_CRT_ALLOC flag to the snmalloc clone path but I am facing include errors as shown in the below image:

fatal error: snmalloc/snmmlloc.h: No such file or directory

I have tried using -I and CMAKE_INCLUDE_PATH to set the include directory path but it doesn’t work.

Cmake Command used for build-:

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_ENABLE_EH=OFF -DLLVM_ENABLE_RTTI=ON -DLLVM_PARALLEL_COMPILE_JOBS=8 -DLLVM_PARALLEL_LINK_JOBS=8 -DLLVM_INTEGRATED_CRT_ALLOC="D:\git\snmalloc" -S llvm -B llvm-build 
3
  • 2
    Welcome to Stackoverflow. Please don't post pictures of text. Copy-paste the relevant text into your question. Why should I not upload images of code/data/errors? Commented Mar 5 at 22:05
  • The error message alone is not very useful for diagnosing the problem. Show the command you ran and its entire console output. (If the output is very long, omit parts that seem unrelated, noting the elisions with "[,,,]".) Also, does the file snmalloc/snmalloc.h exist on your computer? If so, where is it, and how does that location relate to the directory where you invoked the compile command? Commented Mar 9 at 9:59
  • @ScottMcPeak, thanks for the response, I have added the cmake command used in the description. According to the instructions given in LLVM, with LLVM_INTEGRATED_CRT_ALLOC flag, we have to give the clone path for that specific allocator and it will fetch the required lib files based on the path specified in the CMakeLists. Commented Mar 12 at 17:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.