[llvm] r226828 - Pass -Wl, -z, defs when building shared libraries, but not with the sanitizers.

İsmail Dönmez ismail at donmez.ws
Sat Jan 24 05:34:45 PST 2015


Hi,

On Fri, Jan 23, 2015 at 9:37 PM, Chaoren Lin <chaorenl at google.com> wrote:
> Hi Rafael,
>
> This commit causes link errors for LLDB on Linux:
>
> [308/2938] Linking CXX shared library lib/readline.so
> FAILED: : && /usr/bin/clang++  -fPIC  -fPIC -fvisibility-inlines-hidden
> -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual
> -Wmissing-field-initializers -pedantic -Wno-long-long
> -Wcovered-switch-default -std=c++11 -fcolor-diagnostics -ffunction-sections
> -fdata-sections -g  -Wl,-z,defs -shared -Wl,-soname,readline.so -o
> lib/readline.so
> tools/lldb/scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o
> -Wl,-rpath,"\$ORIGIN/../lib" && :
> tools/lldb/scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o:
> In function `initreadline':
> /usr/local/src/llvm/tools/lldb/scripts/Python/modules/readline/readline.cpp:21:
> undefined reference to `Py_InitModule4_64'
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> Could you exclude Linux for now as well?

I think lldb is underlinking, see
http://lists.cs.uiuc.edu/pipermail/lldb-dev/2015-January/006385.html



More information about the llvm-commits mailing list