<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 6, 2015 at 8:09 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No problem. Thanks for noticing.<br>
<br>
I also disabled the linker optimizations, so Debug builds should be a<br>
bit faster too.<br></blockquote><div><br>Yeah, saw that - what sort of optimizations does the linker do with that anyway? (I assume not enough to recoup the 3 seconds on one or two executions of the program, at least)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On 6 April 2015 at 10:47, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
> On Mon, Apr 6, 2015 at 7:34 AM, Rafael Espindola<br>
> <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
>><br>
>> Author: rafael<br>
>> Date: Mon Apr  6 09:34:43 2015<br>
>> New Revision: 234159<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=234159&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=234159&view=rev</a><br>
>> Log:<br>
>> Don't use -ffunction-sections -fdata-sections on debug builds.<br>
><br>
><br>
> Thanks a bunch!<br>
><br>
>><br>
>><br>
>> Unfortunately, on ELF there is not used attribute on the .o files,<br>
>> so there is no easy way to keep the dump function alive.<br>
>><br>
>> If we are not gcing, we may as well produce non gcable files and<br>
>> avoid the cost.<br>
>><br>
>> Linking a debug clang now takes 18.856225992 seconds, before it<br>
>> took 21.206897447.<br>
>><br>
>> I will try avoiding --gc-sections -O3 on a followup patch.<br>
>><br>
>> Modified:<br>
>>     llvm/trunk/cmake/modules/HandleLLVMOptions.cmake<br>
>><br>
>> Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=234159&r1=234158&r2=234159&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=234159&r1=234158&r2=234159&view=diff</a><br>
>><br>
>> ==============================================================================<br>
>> --- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)<br>
>> +++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Mon Apr  6 09:34:43<br>
>> 2015<br>
>> @@ -486,7 +486,8 @@ endif()<br>
>>  # But MinSizeRel seems to add that automatically, so maybe disable these<br>
>>  # flags instead if LLVM_NO_DEAD_STRIP is set.<br>
>>  if(NOT CYGWIN AND NOT WIN32)<br>
>> -  if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")<br>
>> +  if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND<br>
>> +     NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")<br>
>>      check_c_compiler_flag("-Werror -fno-function-sections"<br>
>> C_SUPPORTS_FNO_FUNCTION_SECTIONS)<br>
>>      if (C_SUPPORTS_FNO_FUNCTION_SECTIONS)<br>
>>        # Don't add -ffunction-section if it can be disabled with<br>
>> -fno-function-sections.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
</div></div></blockquote></div><br></div></div>