<div dir="ltr"><div dir="ltr"><div>With debug builds and gnu ld some of the links take up to 9 or 10 GB of RAM, so with only 8 GB you'd want -DLLVM_PARALLEL_LINK_JOBS=1 and even then still be swapping.</div><div><br></div><div>The OS X linker uses far less RAM, and I'm told gold is better too, so maybe there's also no problem on Windows. Or not as much of one. I think I'd use -DLLVM_PARALLEL_LINK_JOBS=1 *anyway* with only 8 GB system RAM.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 19, 2018 at 2:38 AM, Dennis Luehring via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>are you setting the optimized tablegen option?<br>
<br></span>
LLVM_OPTIMIZED_TABLEGEN is not active - i will try that<span class=""><br>
<br>
>In addition, make sure you have plenty of memory<br>
<br></span>
i've got only Intel Core 2 Quad CPU Q8300/2.50Ghz and 8GB RAM for testing<br>
not much cpu power AND memory<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
Am 19.09.2018 um 11:31 schrieb James Henderson:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regarding the Debug build taking hours, are you setting the optimized<br>
tablegen option? If you aren't the Debug build will take a very long<br>
time. In addition, make sure you have plenty of memory, because the<br>
link stages take up a lot on Debug builds.<br>
On Wed, 19 Sep 2018 at 10:04, Dennis Luehring via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> >because with that generator the CMAKE_BUILD_TYPE variable is ignored<br>
> >because it is a "multi-configuration target".<br>
><br>
> thanks for the link, is that a bug in the CMake configuration (or better<br>
> not getting any warning) or is there just documentation missing?<br>
><br>
> so i can use --config Debug or --config Release and get the correct<br>
> results - i hope that works the build takes hours<br>
><br>
> strange is that -DCMAKE_BUILD_TYPE=Debug results in a different<br>
> build-directory size compared to -DCMAKE_BUILD_TYPE=Release - so its not<br>
> fully ignored?<br>
><br>
> Am 19.09.2018 um 10:30 schrieb <a href="mailto:Boldizsar.Palotas@esa.int" target="_blank">Boldizsar.Palotas@esa.int</a>:<br>
> > If I understand correctly, you need to set Release mode within the VS IDE<br>
> > because with that generator the CMAKE_BUILD_TYPE variable is ignored<br>
> > because it is a "multi-configuration target".<br>
> ><br>
> > see<br>
> > <a href="https://stackoverflow.com/questions/24460486/cmake-build-type-not-being-used-in-cmakelists-txt" rel="noreferrer" target="_blank">https://stackoverflow.com/ques<wbr>tions/24460486/cmake-build-<wbr>type-not-being-used-in-cmakeli<wbr>sts-txt</a><br>
> ><br>
> ><br>
> ><br>
> > From: Dennis Luehring via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
> > To: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
> > Date: 2018.09.19 06:11<br>
> > Subject: [llvm-dev] CMake build of LLVM/clang with<br>
> > -DCMAKE_BUILD_TYPE=Release does not create release versions?<br>
> > Sent by: "llvm-dev" <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.o<wbr>rg</a>><br>
> ><br>
> ><br>
> ><br>
> > my build environment:<br>
> ><br>
> > Win7 x64<br>
> > VStudio 2017 Community Edition 15.8.4 (latest)<br>
> > CMake 3.12.1 (x86)<br>
> > git 2.19.0 (latest, x64)<br>
> > Python 2.7.2 (x86)<br>
> ><br>
> > directory structure<br>
> ><br>
> > test<br>
> > llvm <-- git clone <a href="https://github.com/llvm-mirror/llvm" rel="noreferrer" target="_blank">https://github.com/llvm-mirror<wbr>/llvm</a><br>
> > tools<br>
> > clang <-- git clone <a href="https://github.com/llvm-mirror/clang" rel="noreferrer" target="_blank">https://github.com/llvm-mirror<wbr>/clang</a><br>
> > llvm_build<br>
> ><br>
> > Debug build: clean build, llvm_build is deleted before<br>
> ><br>
> > llvm_build> cmake -Thost=x64 -G "Visual Studio 15 2017 Win64"<br>
> > -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=host<br>
> > -DLLVM_BUILD_EXAMPLES=1 -DCLANG_BUILD_EXAMPLES=1<br>
> > -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF ..\llvm<br>
> ><br>
> > builds for hours, a few warning, no errors -> llvm_build is ~44GB<br>
> ><br>
> > i can find many working libs/exes(also examples) in<br>
> > llvm_build\Debug\(lib|bin)<br>
> ><br>
> > then i tried to build release versions<br>
> ><br>
> > Release build: clean build, llvm_build is deleted before<br>
> ><br>
> > llvm_build> cmake -Thost=x64 -G "Visual Studio 15 2017 Win64"<br>
> > -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host<br>
> > -DLLVM_BUILD_EXAMPLES=1 -DCLANG_BUILD_EXAMPLES=1<br>
> > -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_DOCS=OFF ..\llvm<br>
> ><br>
> > builds for hours, a few warning, no errors -> llvm_build is ~47GB (i<br>
> > though Release would be smaller?)<br>
> ><br>
> > i can find many working libs/exes(also examples) in<br>
> > llvm_build\Debug\(lib|bin) - the executables seems to be larger as in<br>
> > "Debug"-Build?<br>
> ><br>
> > llvm-build\Release\bin just contains llvm-lit.py<br>
> ><br>
> > why is the debug folder populated and where i can find the Release build<br>
> > libs/exes?<br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
> ><br>
> ><br>
> ><br>
> > This message is intended only for the recipient(s) named above. It may contain proprietary information and/or<br>
> > protected content. Any unauthorised disclosure, use, retention or dissemination is prohibited. If you have received<br>
> > this e-mail in error, please notify the sender immediately. ESA applies appropriate organisational measures to protect<br>
> > personal data, in case of data privacy queries, please contact the ESA Data Protection Officer (<a href="mailto:dpo@esa.int" target="_blank">dpo@esa.int</a>).<br>
> ><br>
> ><br>
><br>
> ______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote>
<br>
<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>