<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=utf-8 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.17207"></HEAD>
<BODY id=MailContainerBody 
style="PADDING-TOP: 15px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px" leftMargin=0 
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT size=2 face=Consolas>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=vonosmas@gmail.com 
href="mailto:vonosmas@gmail.com">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 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 dir=ltr>
<DIV class=gmail_extra>
<DIV class=gmail_quote>
<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 size=2 face=Consolas></FONT><FONT size=2 face=Consolas></FONT><FONT 
size=2 face=Consolas></FONT><FONT size=2 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><FONT size=2 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 size=2 face=Consolas></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Consolas>Apologies for the incorrect first 
assessment.</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Consolas></FONT> </DIV>
<DIV dir=ltr><FONT size=2 face=Consolas>Cheers</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Consolas>Andy</FONT></DIV>
<DIV dir=ltr><FONT size=2 face=Consolas></FONT> </DIV>
<DIV dir=ltr><FONT size=2 
face=Consolas></FONT> </DIV></DIV></DIV></BODY></HTML>