<div dir="ltr">lgtm, as Pavel points out build_shared_libs is already broken anyway and this doesn't make it worse, while also not touching the non build_shared_libs path.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 29, 2016 at 10:15 AM Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sgtm. Zach's the owner here.<br>
<br>
On Fri, Jan 29, 2016 at 6:47 AM, Pavel Labath <<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>> wrote:<br>
> Zachary, Hans,<br>
><br>
> this is not super-important, as a BUILD_SHARED_LIBS build of lldb will<br>
> still remain broken due to other issues, but I'd still like to get<br>
> this into 3.8, as it will reduce the pain for anyone trying to get<br>
> this build working downstream. What do you think?<br>
><br>
> problem reported in pr26335.<br>
><br>
> cheers,<br>
> pl<br>
><br>
> On 29 January 2016 at 11:59, Pavel Labath via lldb-commits<br>
> <<a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br>
>> Author: labath<br>
>> Date: Fri Jan 29 05:59:57 2016<br>
>> New Revision: 259188<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=259188&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=259188&view=rev</a><br>
>> Log:<br>
>> Fix linking of lldb-server with BUILD_SHARED_LIBS<br>
>><br>
>> Summary:<br>
>> The BUILD_SHARED_LIBS branch of lldb-server link flags was hopelessly broken, at least since we<br>
>> started restricting the symbols exported by liblldb. lldb-server depends on symbols from the<br>
>> lldb_private namespace, so it cannot link to the public interface of liblldb. Instead I make it<br>
>> link to the individual libraries constituting liblldb, just like it does in the<br>
>> !BUILD_SHARED_LIBS case.<br>
>><br>
>> This does not make the BUILD_SHARED_LIBS build of lldb fully functional yet, due to the way<br>
>> liblldb dependencies are managed, but it's a step in that direction.<br>
>><br>
>> Reviewers: zturner, tfiala<br>
>><br>
>> Subscribers: lldb-commits<br>
>><br>
>> Differential Revision: <a href="http://reviews.llvm.org/D16678" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16678</a><br>
>><br>
>> Modified:<br>
>>Â Â Â lldb/trunk/tools/lldb-server/CMakeLists.txt<br>
>><br>
>> Modified: lldb/trunk/tools/lldb-server/CMakeLists.txt<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/CMakeLists.txt?rev=259188&r1=259187&r2=259188&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/CMakeLists.txt?rev=259188&r1=259187&r2=259188&view=diff</a><br>
>> ==============================================================================<br>
>> --- lldb/trunk/tools/lldb-server/CMakeLists.txt (original)<br>
>> +++ lldb/trunk/tools/lldb-server/CMakeLists.txt Fri Jan 29 05:59:57 2016<br>
>> @@ -33,24 +33,19 @@ add_lldb_executable(lldb-server<br>
>>Â Â Â LLDBServerUtilities.cpp<br>
>>Â )<br>
>><br>
>> -if (BUILD_SHARED_LIBS )<br>
>> -Â target_link_libraries(lldb-server liblldb)<br>
>> -Â target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})<br>
>> +# The Darwin linker doesn't understand --start-group/--end-group.<br>
>> +if (LLDB_LINKER_SUPPORTS_GROUPS)<br>
>> +Â target_link_libraries(lldb-server<br>
>> +Â Â Â Â Â Â Â Â Â Â Â Â -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)<br>
>> +Â target_link_libraries(lldb-server<br>
>> +Â Â Â Â Â Â Â Â Â Â Â Â -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)<br>
>>Â else()<br>
>> -Â # The Darwin linker doesn't understand --start-group/--end-group.<br>
>> -Â if (LLDB_LINKER_SUPPORTS_GROUPS)<br>
>> -Â Â target_link_libraries(lldb-server<br>
>> -Â Â Â Â Â Â Â Â Â Â Â Â Â -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)<br>
>> -Â Â target_link_libraries(lldb-server<br>
>> -Â Â Â Â Â Â Â Â Â Â Â Â Â -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group)<br>
>> -Â else()<br>
>> -Â Â target_link_libraries(lldb-server ${LLDB_USED_LIBS})<br>
>> -Â Â target_link_libraries(lldb-server ${CLANG_USED_LIBS})<br>
>> -Â endif()<br>
>> -Â llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})<br>
>> -<br>
>> -Â target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})<br>
>> +Â target_link_libraries(lldb-server ${LLDB_USED_LIBS})<br>
>> +Â target_link_libraries(lldb-server ${CLANG_USED_LIBS})<br>
>>Â endif()<br>
>> +llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})<br>
>> +<br>
>> +target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})<br>
>><br>
>>Â set_target_properties(lldb-server PROPERTIES VERSION ${LLDB_VERSION})<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> lldb-commits mailing list<br>
>> <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">lldb-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
</blockquote></div>