<div dir="ltr">Got it, thanks for clarifications. I've submitted r216083 which adds CMAKE_EXE_LINKER_FLAGS to try_compile test. Let me know if it fixes a problem for you.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Aug 20, 2014 at 12:05 AM, Andy Gibbs <span dir="ltr"><<a href="mailto:andyg1001@hotmail.co.uk" target="_blank">andyg1001@hotmail.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>



<div style="PADDING-TOP:15px;PADDING-LEFT:10px;PADDING-RIGHT:10px" name="Compose message area">
<div><font face="Consolas">
<div style="BACKGROUND:#f5f5f5">
<div><b>From:</b> <a title="vonosmas@gmail.com" href="mailto:vonosmas@gmail.com" target="_blank">Alexey Samsonov</a> </div>
<div><b>Sent:</b> Monday, August 18, 2014 9:58 PM</div>
<div><b>Subject:</b> Re: [compiler-rt] r215247 - [CMake] Determine which 
compiler-rt librariesare supported on</div></div></font></div><div class="">
<div style="FONT:10pt Tahoma">
<div><font face="Consolas"></font> </div>
<div>On Sat, Aug 16, 2014 at 2:33 PM, Andy Gibbs <span dir="ltr"><<a href="mailto:andyg1001@hotmail.co.uk" target="_blank">andyg1001@hotmail.co.uk</a>></span> wrote:<br></div></div>
</div><div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><div class="">
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
  <div>On Saturday, August 09, 2014 12:01 AM, Alexey Samsonov wrote:<br>
  <blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">Author: 
    samsonov<br>Date: Fri Aug  8 17:01:20 2014<br>New Revision: 
    215247<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=215247&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=215247&view=rev</a><br>Log:<br>[CMake] 
    Determine which compiler-rt libraries are supported on<br>a given platform 
    in a top-level CMakeLists.txt to use it both<br>in lib/ and in test/ 
    subdirectories. Move architecture/platform<br>checks to 
  config-ix.<br></blockquote><br></div>Unfortunately your patch breaks builds 
  where special linker flags are used: "try_compile" fails since the 
  user-specified linker flags are overridden.<br></blockquote>
<div><font face="Consolas"></font><font face="Consolas"></font><font face="Consolas"></font><font face="Consolas"></font><br></div>
<blockquote style="MARGIN-RIGHT:0px" dir="ltr">
  <div>Did the build work before the patch? I didn't change the try_compile 
  function, just moved it to separate file. What platform/arch are you building 
  for? Your patch is probably ok, just making sure I understand the cause of the 
  breakage.<br></div></blockquote>
</div><div><font face="Consolas">Hmm, you're right.  Plus I'd isolated the 
wrong patch anyway since I'm building from the 3.5 branch and this branched 
before this patch was committed.  I can't say exactly when the breakage 
happened, since the previous fully working version I have is the 3.4 release and 
since then I have only tracked trunk sporadically.  Interestingly, the 
change to the try_compile function was before the 3.4 branch, so it must be some 
other change that has highlighted the problem.  In order to get a correct 
build for llvm, I have to run cmake twice, first with linker flags as part of 
CMAKE_CXX_FLAGS then separated out into CMAKE_*_LINKER_FLAGS.  The first 
pass always, and still always, completes successfully.  The second pass now 
fails with an unable to compile error (missing library).  I imagine 
somewhere a change has been made to re-evaluate this part of the configuration, 
causing the failure.  The simple solution, therefore, is simply to pass the 
linker flags on.</font></div></div>
<div dir="ltr"><font face="Consolas"></font> </div>
<div dir="ltr"><font face="Consolas">Apologies for the incorrect first 
assessment.</font></div>
<div dir="ltr"><font face="Consolas"></font> </div>
<div dir="ltr"><font face="Consolas">Cheers</font></div><span class="HOEnZb"><font color="#888888">
<div dir="ltr"><font face="Consolas">Andy</font></div>
<div dir="ltr"><font face="Consolas"></font> </div>
<div dir="ltr"><font face="Consolas"></font> </div></font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div>