<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p>I just found the perl script for x86_64 assembly failed to detect Xcode 7 environment (Apple LLVM 7.x), and skipped generating AVX code for MAC OS ($avx variable is always false). The reason is Apple since Xcode 7.0 removed string "based on LLVM x.y.z" from
 version information. Now the clang -v command returns:</p>
<p><br>
</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
Apple LLVM version 7.0.0 (clang-700.1.76)</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
Target: x86_64-apple-darwin15.0.0</p>
<p></p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
Thread model: posix</p>
<div><br>
</div>
<div>So the way to detect compiler version becomes to check either "LLVM version" or "clang-". Here is a patch to check the first string (take rsaz-avx2.pl as an example):</div>
<div><br>
</div>
<div>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
if (!$avx && `$ENV{CC} -v 2>&1` =~ /LLVM version ([0-9]+)\./) {</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
<span class="Apple-tab-span" style="white-space:pre"></span>$avx = ($1>=5) + ($1>=5);</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
<span class="Apple-tab-span" style="white-space:pre"></span>$addx = ($1>=5);</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 18px; line-height: normal; font-family: Menlo;">
}</p>
</div>
<div><br>
</div>
<div>Version number 5 is used but not 7 due to the reason Apple start AVX support from Xcode 5 (LLVM 5).</div>
<div><br>
</div>
<div>A list of Xcode records can be found here:</div>
<div><a href="https://gist.github.com/yamaya/2924292" id="LPlnk213655" title="https://gist.github.com/yamaya/2924292
Cmd+Click or tap to follow the link">https://gist.github.com/yamaya/2924292</a>
<div id="LPBorder_GT_14474367631440.588418684899807" style="margin-top: 20px; margin-bottom: 20px; overflow: auto; width: 100%;">
<table id="LPContainer_14474367631410.4687433070503175" style="border-top-color: rgb(204, 204, 204); border-top-width: 1px; border-top-style: solid; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); width: 80%; background-color: rgb(255, 255, 255); position: relative; overflow: auto;">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14474367631430.3866634799633175" colspan="1" style="width: 250px; position: relative; display: table-cell; vertical-align: middle; padding-right: 20px;">
<div id="LPImageContainer_14474367631440.5897777338977903" style="margin-top: 12px; background-color: rgb(255, 255, 255); height: 254px; width: 250px; position: relative; padding: 0px; display: table;">
<a id="LPImageAnchor_14474367631440.4753044166136533" href="https://gist.github.com/yamaya/2924292" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." style="display: inline-block; margin-left: auto; margin-right: auto; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px;" width="250" height="250" src="https://avatars0.githubusercontent.com/u/278790?v=3&s=400"></a></div>
</td>
<td>
<div id="LPTitle_14474367631440.8272855533286929" style="top: 0px; margin-top: 8px; font-size: 21px; font-family: wf_segoe-ui_semilight, 'Segoe UI Semilight', 'Segoe WP Semilight', 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; color: rgb(51, 51, 51); margin-left: 14px; margin-right: 14px;">
Xcode clang version record · GitHub</div>
<div id="LPDescription_14474367631440.09035223419778049" style="margin-top: 8px; font-size: 13px; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; color: rgb(102, 102, 102); margin-left: 14px; margin-right: 14px;">
After today's update of command line tools/xcode I get: About Xcode: Version 6.3 (6D570) /usr/bin/clang++ --version Apple LLVM version 6.1.0 (clang-602.0.49) (based ...</div>
<div id="LPUrlContainer_14474367631440.6244850244838744" style="margin: 8px 14px 10px; height: 18px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;">
<a id="LPUrlAnchor_14474367631440.5186906603630632" href="https://gist.github.com/yamaya/2924292" target="_blank" style="font-size: 11px; font-family: wf_segoe-ui_normal, 'Segoe UI', 'Segoe WP', Tahoma, Arial, sans-serif; text-decoration: none;">Read more...</a></div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
This email and any attachments are for the sole use of the intended recipients and may be privileged or confidential. Any distribution, printing or other use by anyone else is prohibited. If you are not an intended recipient, please contact the sender immediately,
 and permanently delete this email and attachments.
</body>
</html>