[cfe-dev] Link error compiling with -faddress-sanitizer (___asan_init undefined)

Kostya Serebryany kcc at google.com
Tue Mar 13 20:03:33 PDT 2012


On Tue, Mar 13, 2012 at 5:09 PM, Sean McBride <sean at rogue-research.com>wrote:

> On Tue, 13 Mar 2012 13:19:38 -0700, Nico Weber said:
>
> >Did you check out and build compiler-rt as described on
> >http://clang.llvm.org/get_started.html ? (It's a recent addition, so
> >if you skipped that page because you already had a clang checkout, you
> >might have missed it.)
>
> Nico,
>
> Exactly right.  If I follow those instructions and build with
> configure/make then I get a clang that accepts -faddress-sanitizer.  Thanks.
>
> But if I build with CMake, which is what I usually do, it still doesn't
> seem to work.  Should it?  Is there a special option to turn on?
>  LLVM_BUILD_RUNTIME and LLVM_INCLUDE_RUNTIME are on by default, if they're
> related.
>

Ah, CMake... afaict, compiler-rt (at least, asan) does not build with cmake
:(

--kcc


>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120313/c63a2dd9/attachment.html>


More information about the cfe-dev mailing list