[llvm-dev] Building LLVM through Bazel

Douglas Parker via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 5 15:39:55 PDT 2018


Hi llvm-dev,

I'm not sure if this is the right place for this, but I posted a question
on Stack Overflow
<https://stackoverflow.com/questions/51585688/building-llvm-with-bazel> a
week ago with no response, so feel free to point me elsewhere if there is a
more appropriate place.

Basically, I have a project using LLVM as a dependency currently building
with CMake, which I would like to switch over to Bazel. However I am not
able to get LLVM to build because header files are always missing. Bazel is
supposed to do the actual C++ compilation, but without the headers it can't
do that. I've tried looking through LLVM's build system, but it's pretty
complex and I'm not that familiar with CMake.

Are there certain targets which will generate all these headers which I can
run before Bazel starts compiling C++ source? The closest I've found is
ModuleMaker, which seems to run tblgen to create some of these headers, but
I still find I'm missing some. Are there other targets which build header
files or are there any other generated source files that need to created
before compilation?

One example error I'm getting at the moment is:
In file included from
external/llvm/llvm-master/include/llvm/MC/MCStreamer.h:30:0,
                 from
external/llvm/llvm-master/lib/Object/RecordStreamer.h:16,
                 from
external/llvm/llvm-master/lib/Object/ModuleSymbolTable.cpp:17:
external/llvm/llvm-master/include/llvm/Support/TargetParser.h:61:31: fatal
error: ARMTargetParser.def: No such file or directory

Any direction would be greatly appreciated:

Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180805/952fb16d/attachment.html>


More information about the llvm-dev mailing list