[libcxxabi] r220509 - Only link the tests against -ldl on linux

Eric Fiselier eric at efcs.ca
Thu Oct 23 15:59:55 PDT 2014


Hi Jon,

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.
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.

Originally I was trying to mimic linkSanitizerRuntimeDeps in
clang/lib/Driver/Tools.cpp.
https://github.com/llvm-mirror/clang/blob/master/lib/Driver/Tools.cpp#L2216
However I was told that I explicitly check for linux instead of !freeBSD.

After checking the output of `clang++-3.5 -### -xc++ -fsanitize=address -`
on my macbook it doesn't seem that '-ldl' is linked.

/Eric



On Thu, Oct 23, 2014 at 4:40 PM, Jonathan Roelofs <jonathan at codesourcery.com
> wrote:

>
>
> On 10/23/14 2:44 PM, Eric Fiselier wrote:
> > Author: ericwf
> > Date: Thu Oct 23 15:44:25 2014
> > New Revision: 220509
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=220509&view=rev
> > Log:
> > Only link the tests against -ldl on linux
> >
> > Modified:
> >     libcxxabi/trunk/test/lit.cfg
> >
> > Modified: libcxxabi/trunk/test/lit.cfg
> > URL:
> http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=220509&r1=220508&r2=220509&view=diff
> >
> ==============================================================================
> > --- libcxxabi/trunk/test/lit.cfg (original)
> > +++ libcxxabi/trunk/test/lit.cfg Thu Oct 23 15:44:25 2014
> > @@ -227,7 +227,7 @@ san = lit_config.params.get('llvm_use_sa
> >  if san is None:
> >      san = getattr(config, 'llvm_use_sanitizer', None)
> >  if san:
> > -    if not sys.platform.startswith('freebsd'):
> > +    if sys.platform == 'linux2':
> What is 'linux2'? Is that a typo? Is this needed on Mac?
>
> Jon
> >          link_flags += ['-ldl']
> >      if san == 'Address':
> >          compile_flags += ['-fsanitize=address']
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/929dc1e1/attachment.html>


More information about the cfe-commits mailing list