<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div>I kind of figured it out and scripted the targets picking solution myself but that '<span>LLVM_DISTRIBUTION_COMPONENTS' option is definitely better as it should work with both MsBuild and ninja. Too bad this isn't in the docs though:</span></div><div><span><br></span></div><div><a href="https://llvm.org/docs/CMake.html#llvm-specific-variables" rel="nofollow" target="_blank">https://llvm.org/docs/CMake.html#llvm-specific-variables</a></div><div id="yahoo_quoted_5024444191" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, April 5, 2019, 8:44:43 PM GMT+3, Chris Bieneman <chris.bieneman@me.com> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv9301731779"><div>You don't actually need to change your CMake configuration to reduce the number of components you build. Just don't build the `all` target, instead build the components you need.<div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779">Alternatively you can set the CMake variable `LLVM_DISTRIBUTION_COMPONENTS` to the list of things you need, which will result in the generation of a `distribution` target which will build just those pieces.</div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779">-Chris<br class="yiv9301731779" clear="none"><div><br class="yiv9301731779" clear="none"><blockquote class="yiv9301731779" type="cite"><div class="yiv9301731779yqt6068756543" id="yiv9301731779yqt71288"><div class="yiv9301731779">On Mar 29, 2019, at 3:19 PM, Liviu Prodea via llvm-dev <<a rel="nofollow" shape="rect" class="yiv9301731779" ymailto="mailto:llvm-dev@lists.llvm.org" target="_blank" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="yiv9301731779Apple-interchange-newline" clear="none"><div class="yiv9301731779"><div class="yiv9301731779"><div class="yiv9301731779yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv9301731779">I configure <span class="yiv9301731779">LLVM </span>build with this command</div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779"><span class="yiv9301731779">cd llvm-8.0.0.src & md buildsys-x64-MT & cd buildsys-x64-MT & cmake -G "Ninja" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../x64-MT ..</span></div><div class="yiv9301731779"><span class="yiv9301731779"><br class="yiv9301731779" clear="none"></span></div><div class="yiv9301731779"><span class="yiv9301731779">The number of build objects grew with every major release to 1660 for LLVM 7 and 1761 for LLVM 8.<br class="yiv9301731779" clear="none"></span></div><div class="yiv9301731779"><span class="yiv9301731779"><br class="yiv9301731779" clear="none"></span></div><div class="yiv9301731779"><span class="yiv9301731779">I only need the components requested here</span></div><div class="yiv9301731779"><span class="yiv9301731779"><br class="yiv9301731779" clear="none"></span></div><div class="yiv9301731779"><a rel="nofollow" shape="rect" class="yiv9301731779" target="_blank" href="https://gitlab.freedesktop.org/mesa/mesa/blob/master/scons/llvm.py#L103">https://gitlab.freedesktop.org/mesa/mesa/blob/master/scons/llvm.py#L103</a></div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779">After reading</div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779"><a rel="nofollow" shape="rect" class="yiv9301731779" target="_blank" href="https://llvm.org/devmtg/2015-04/slides/eurollvm-2015-build.pdf">https://llvm.org/devmtg/2015-04/slides/eurollvm-2015-build.pdf</a></div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779">and</div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779"><a rel="nofollow" shape="rect" class="yiv9301731779" target="_blank" href="https://llvm.org/docs/CMake.html">https://llvm.org/docs/CMake.html</a></div><div class="yiv9301731779"><br class="yiv9301731779" clear="none"></div><div class="yiv9301731779">I found these options to be relevant:<span class="yiv9301731779"> LLVM_DYLIB_COMPONENTS, <span class="yiv9301731779">LLVM_BUILD_LLVM_DYLIB, <span class="yiv9301731779">LLVM_LINK_LLVM_DYLIB, <span class="yiv9301731779">LLVM_BUILD_TOOLS and <span class="yiv9301731779">LLVM_INCLUDE_TOOLS. Unfortunately <span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779">LLVM_DYLIB_COMPONENTS</span></span> depends on LLVM_BUILD_LLVM_DYLIB which doesn't support MSVC, <span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779">I can turn off LLVM_BUILD_TOOLS and<span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"><span class="yiv9301731779"> <span class="yiv9301731779">LLVM_INCLUDE_TOOLS</span></span></span></span></span></span> if I figure out how to filter unneeded components as I would no longer need llvm-config anymore.</span></span></span></span></span></span></span></span></span></span></span></span> </span><br class="yiv9301731779" clear="none"></div></div></div>_______________________________________________<br class="yiv9301731779" clear="none">LLVM Developers mailing list<br class="yiv9301731779" clear="none"><a rel="nofollow" shape="rect" class="yiv9301731779" ymailto="mailto:llvm-dev@lists.llvm.org" target="_blank" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br class="yiv9301731779" clear="none">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class="yiv9301731779" clear="none"></div></div></blockquote></div><br class="yiv9301731779" clear="none"></div></div></div></div>
</div>
</div></div></body></html>