<div dir="ltr">I believe it would be possible to run a cmake command to generate a BUILD file, though I don't know if that would be easier to maintain on the LLVM side. Would definitely be happy to see direct support, though I was just trying to figure out what's needed to hack this together on my end.<div dir="auto"><br></div><div dir="auto">I guess my real question is what underlying commands are necessary to build all the source files (without actually compiling the C/C++)? If I can understand how to do this manually with terminal/cmake/tblgen, then I could probably get it to work with Bazel.</div><div dir="auto"><br></div><div>Looking at <a href="https://github.com/tensorflow/tensorflow/blob/efddd17519e43e956c3fa79981c408803521fe61/third_party/llvm/llvm.autogenerated.BUILD#L195">TensorFlow's setup</a>, it looks like tblgen has dependencies on support which goes down to zlib and gets a lot of complexity there. I get the impression that tblgen isn't so complicated as to require all that. What would be the minimum steps to build tblgen from source?</div><div dir="auto"><br></div><div dir="auto">Doug</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 15, 2018 at 1:28 PM Chris Bieneman <<a href="mailto:chris.bieneman@me.com">chris.bieneman@me.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">There have been discussions about adding a Bazel generator before:<div><a href="https://cmake.org/pipermail/cmake-developers/2017-July/030144.html" target="_blank">https://cmake.org/pipermail/cmake-developers/2017-July/030144.html</a></div><div><br></div><div>There does seem to be interest in having that support in CMake, and I can't imagine any insurmountable reason why it couldn't be done. The real issue is that nobody has put in the time to do it.</div><div><br></div><div>-Chris<br><div><br><blockquote type="cite"><div>On Aug 15, 2018, at 11:21 AM, David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_602025900269747397Apple-interchange-newline"><div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 15, 2018 at 10:04 AM Chris Lattner <<a href="mailto:clattner@nondot.org" target="_blank">clattner@nondot.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Aug 14, 2018, at 2:43 PM, David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> <br>
> Yeah - not sure we're quite at the point where LLVM wants to start supporting two build systems again (used to be Configure+Make and the CMake system, now it's just the Cmake system), but if you want to make it work out-of-tree it shouldn't be too difficult (Google does this internally with the internal version of Bazel). Writing a short BUILD extension for running tblgen should be possible without too much complexity - not sure what Tensorflow is doing that makes its solution so complicated, it doesn't seem like it should be terribly hard, just a genrule to run tblgen and generate the appropriate files from the td files.<br>
<br>
Would it be technically possible for cmake to generate bazel files?  If so, it seems that that could be a great bridge, and useful to other projects as well.<br></blockquote><div><br>/maybe/? It's an interesting thought - not sure I know enough about either build system to have a very informed opinion here, though.<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Chris<br>
<br>
</blockquote></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></blockquote></div>