[PATCH] D15049: [asan] Skip all non-shared objects in FindFirstDSOCallback.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 17:12:36 PST 2015


eugenis added a comment.

This is fun.
We never explicitly link libc on Linux because CMake check for printf in libc fails spectacularly:

[1/2] Building C object CMakeFiles/cmTC_724d8.dir/CheckFunctionExists.c.o
FAILED: /code/build-llvm0/bin/clang    -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Werror -fcolor-diagnostics -ffunction-sections -fdata-sections -DCHECK_FUNCTION_EXISTS=printf -o CMakeFiles/cmTC_724d8.dir/CheckFunctionExists.c.o   -c /usr/local/share/cmake-3.4/Modules/CheckFunctionExists.c
/usr/local/share/cmake-3.4/Modules/CheckFunctionExists.c:6:6: error: incompatible redeclaration of library function 'printf' [-Werror,-Wincompatible-library-redeclaration]
char CHECK_FUNCTION_EXISTS();

  ^

<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS printf

  ^

/usr/local/share/cmake-3.4/Modules/CheckFunctionExists.c:6:6: note: 'printf' is a builtin with type 'int (const char *, ...)'
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS printf

  ^

1 error generated.

Just kill the whole thing.


http://reviews.llvm.org/D15049





More information about the llvm-commits mailing list