<div dir="ltr">Hi Jon,<div><br></div><div>linux2 *used* to be the value of platform on linux. The 2 used to represent the major kernel version. It's still linux2 on kernels that have a major version of 3. </div><div>after doing a little research it seems that as of python 3.3 the value of sys.platform on linux is just 'linux' (no more '2'). I'll change this to `sys.platform.startswith('linux') instead.</div><div><br></div><div>Originally I was trying to mimic linkSanitizerRuntimeDeps in clang/lib/Driver/Tools.cpp. <a href="https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#L2216">https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#L2216</a><br></div><div>However I was told that I explicitly check for linux instead of !freeBSD. </div><div><br></div><div>After checking the output of `clang++-3.5 -### -xc++ -fsanitize=address -` on my macbook it doesn't seem that '-ldl' is linked.</div><div><br></div><div>/Eric</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 23, 2014 at 4:40 PM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 10/23/14 2:44 PM, Eric Fiselier wrote:<br>
> Author: ericwf<br>
> Date: Thu Oct 23 15:44:25 2014<br>
> New Revision: 220509<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=220509&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=220509&view=rev</a><br>
> Log:<br>
> Only link the tests against -ldl on linux<br>
><br>
> Modified:<br>
>     libcxxabi/trunk/test/lit.cfg<br>
><br>
> Modified: libcxxabi/trunk/test/lit.cfg<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=220509&r1=220508&r2=220509&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=220509&r1=220508&r2=220509&view=diff</a><br>
> ==============================================================================<br>
> --- libcxxabi/trunk/test/lit.cfg (original)<br>
> +++ libcxxabi/trunk/test/lit.cfg Thu Oct 23 15:44:25 2014<br>
> @@ -227,7 +227,7 @@ san = lit_config.params.get('llvm_use_sa<br>
>  if san is None:<br>
>      san = getattr(config, 'llvm_use_sanitizer', None)<br>
>  if san:<br>
> -    if not sys.platform.startswith('freebsd'):<br>
> +    if sys.platform == 'linux2':<br>
</span>What is 'linux2'? Is that a typo? Is this needed on Mac?<br>
<br>
Jon<br>
<div class="HOEnZb"><div class="h5">>          link_flags += ['-ldl']<br>
>      if san == 'Address':<br>
>          compile_flags += ['-fsanitize=address']<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Jon Roelofs<br>
<a href="mailto:jonathan@codesourcery.com">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote></div><br></div>