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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jan 23 12:04:15 PST 2015


On 23 January 2015 at 14:37, 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?
>

 Is this building a python plugin? Can it use add_llvm_loadable_module
instead of add_llvm_library?

I will try to reproduce it.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/fe7f927c/attachment.html>


More information about the llvm-commits mailing list