[llvm-dev] trunk check-all failing on Linux using compiler-rt and libcxx

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 3 12:51:59 PDT 2016


We normally avoid this problem by carefully defining interceptors in TUs
that don't include system headers, but when you add gtest into the mix,
that's not possible.

Maybe we should just intercept malloc instead. It seems unlikely that a
libc implementation will provide an inline definition of malloc.

On Wed, Aug 3, 2016 at 12:19 PM, Steve Downey via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Posting to the list first, rather than filing a bug because I'm not sure
> this is still an intended configuration:
>
> With LLVM configured as:
> CXX=clang++ CC=clang cmake ../llvm/  \
> -DCMAKE_BUILD_TYPE=Release \
> -DCMAKE_INSTALL_PREFIX=~/install/llvm-master/ \
> -DLLVM_TARGETS_TO_BUILD=host \
> -DLLVM_ENABLE_ASSERTIONS=true \
> -DLLVM_ENABLE_LIBCXX=yes \
> -DLLVM_ENABLE_LIBCXXABI=yes
>
> The check-all target is failing to compile the interception tests:
> /home/sdowney/bld/llvm-master/llvm/projects/compiler-rt/lib/interception/tests/interception_linux_test.cc:26:18:
> error: redefinition of 'isdigit'
> INTERCEPTOR(int, isdigit, int d) {
>                  ^
> /usr/include/ctype.h:185:1: note: previous definition is here
> __isctype_f (digit)
> ^
> /usr/include/ctype.h:93:3: note: expanded from macro '__isctype_f'
>   is##type (int __c) __THROW
>    \
>   ^
> <scratch space>:835:1: note: expanded from here
> isdigit
>
> Without the tests, clang builds and appears to work. And in the checkin
> prior to the interception tests, the tests all passed.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160803/0e5a1d33/attachment.html>


More information about the llvm-dev mailing list