<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0);">
<div>Hi everyone,</div>
<div><br>
</div>
<div>I just reported the following issue: <a href="https://llvm.org/bugs/show_bug.cgi?id=24927">https://llvm.org/bugs/show_bug.cgi?id=24927</a></div>
<div><br>
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;">
<pre class="bz_comment_text" id="comment_text_0" style="white-space: pre-wrap; width: 50em;"><font face="Calibri">Using the Xcode 7 linker, one gets messages such as the following when linking objects generated using llvm:

<b><i>ld: warning: object file (foo.o) was built for newer OS X version (14.5) than being linked (10.9)</i></b>

The issue is the following:

a) In lib/Support/Unix/Host.inc, sys::getDefaultTargetTriple() sets the OS name to darwin14.5 when running on MaxOS X 10.10. 14.5 is the Darwin kernel version as reported by uname.

b) In lib/CodeGen/AsmPrinter.cpp, AsmPrinter::doInitialization() writes out this version number to the LC_VERSION_MIN_MACOSX of the generated object.

c) The XCode 7 linker seems to expect that LC_VERSION_MIN_MACOSX contains the minimum version number of the MacOS X SDK (10.9, 10.11, ...), NOT the Darwin kernel version number! 

<i><b>AFAICT, LLVM had this wrong behaviour for a long time. The only new thing with Xcode 7 is that the linker is now reporting a warning for the version mismatch.</b></i></font></pre>
<pre class="bz_comment_text" id="comment_text_0" style="white-space: pre-wrap; width: 50em;"><font face="Calibri">As a workaround, we are temporarily stripping out the darwin kernel version number from the triple in our project code. Something like:</font></pre>
</blockquote>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px;">
<div>
<pre class="bz_comment_text" id="comment_text_1" style="white-space: pre-wrap; width: 50em;"><font face="Consolas" style="font-size: 12px;">// FIXME: LLVM confuses Darwin Kernel version numbers with MacOS X SDK
// version. By stripping out the kernel version number, we prevent the
// LC_VERSION_MIN_MACOSX directive from being emitted. Hopefully, that
// will get fixed by LLVM 3.8...
//
// See LLVM bug 24927: https://llvm.org/bugs/show_bug.cgi?id=24927</font><font face="Consolas"><span style="font-size: 12px;">#if defined(OSX)
#if (LLVM_VERSION_MAJOR < 3) || ((LLVM_VERSION_MAJOR == 3) && (LLVM_VERSION_MINOR < 8 ))
        triple = Triple(triple.getArchName(),
                        triple.getVendorName(),
                        "darwin",
                        triple.getEnvironmentName());
#endif
#endif</span></font></pre>
<pre class="bz_comment_text" id="comment_text_1" style="white-space: pre-wrap; width: 50em;"><span style="font-family: Calibri;">This prevents the LC_VERSION_MIN_MACOSX directives from being emitted into the LLVM generated object files.</span></pre>
</div>
</blockquote>
<div>
<pre class="bz_comment_text" id="comment_text_1" style="font-size: medium; font-family: Calibri, sans-serif; white-space: pre-wrap; width: 50em;"><div><b><i>Any suggestions how to go about fixing LLVM to generate the correct <span style="font-family: Calibri;"> LC_VERSION_MIN_MACOSX minimum SDK version number ? There seems to be no way to pass this information correctly through the Triple!</span></i></b></div><div><font face="Calibri"><br></font></div><div><font face="Calibri">Thanks,</font></div><div><font face="Calibri">Benoit</font></div></pre>
</div>
<div style="font-size: 16px; font-family: Calibri, sans-serif;">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><b><span style="font-size: 9pt; font-family: Arial, sans-serif; color: rgb(99, 99, 99);">Benoit Belley</span></b><span style="font-size: 9pt; "><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">Sr Principal Developer</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">M&E-Product Development Group</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><b><span style="font-size: 7pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">MAIN</span></b><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"> +1
 514 393 1616</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><b><span style="font-size: 7pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">DIRECT</span></b><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"> +1
 438 448 6304</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><b><span style="font-size: 7pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">FAX</span></b><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"> +1
 514 393 0110</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><a href="http://twitter.com/autodesk" style="color: purple; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">Twitter</span></a><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><a href="https://www.facebook.com/Autodesk" style="color: purple; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">Facebook</span></a><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><b><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">Autodesk, Inc.</span></b><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">10 Duke Street</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">Montreal, Quebec, Canada H3C 2L7</span><span style="font-size: 7.5pt; font-family: Arial, sans-serif;"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><a href="http://www.autodesk.com/" style="color: purple; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);">www.autodesk.com</span></a><span style="color: rgb(146, 147, 150); "><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><span style="font-size: 7.5pt; font-family: Arial, sans-serif; color: rgb(146, 147, 150);"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; "><img border="0" width="283" height="41" id="Picture_x0020_1" src="cid:8EC892C4-9C98-4898-86FF-400B8B2B2344" alt="Description: Email_Signature_Logobar" type="image/png"><o:p></o:p></p>
<div style="font-family: Calibri; font-size: medium; ">
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">
<span style="font-size: 11.5pt; "> </span></p>
</div>
</div>
</body>
</html>