[Lldb-commits] [PATCH] D36358: [lldb] [cmake] Add explicit linkage from Core to curses
mgorny created this revision. The Core library calls functions provided by the curses library. Add an appropriate explicit LINK_LIBS to ${CURSES_LIBRARIES} to propagate the dependency correctly within the build system. It seems that so far the linkage was handled by some kind of implicit magic LLDB_SYSTEM_LIBS variable. However, it stopped working for unittests for some reason, and I don't see a point in wasting my time trying to figure out why this hack stopped working if the same result can be achieved by exposing the correct dependency in the Core library, and letting CMake propagate it. Repository: rL LLVM https://reviews.llvm.org/D36358 Files: source/Core/CMakeLists.txt Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -67,6 +67,9 @@ BinaryFormat Support Demangle + + LINK_LIBS +${CURSES_LIBRARIES} ) # Needed to properly resolve references in a debug build. Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -67,6 +67,9 @@ BinaryFormat Support Demangle + + LINK_LIBS +${CURSES_LIBRARIES} ) # Needed to properly resolve references in a debug build. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D36358: [lldb] [cmake] Add explicit linkage from Core to curses
mgorny updated this revision to Diff 109879. mgorny added a comment. Forgive my poor eyesight, obviously this could go into existing LINK_LIBS ;-). https://reviews.llvm.org/D36358 Files: source/Core/CMakeLists.txt Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -62,6 +62,7 @@ lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage lldbPluginObjectFileJIT +${CURSES_LIBRARIES} LINK_COMPONENTS BinaryFormat Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -62,6 +62,7 @@ lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage lldbPluginObjectFileJIT +${CURSES_LIBRARIES} LINK_COMPONENTS BinaryFormat ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D36358: [lldb] [cmake] Add explicit linkage from Core to curses
Does this evaluate to nothing if curses is not present? On Sat, Aug 5, 2017 at 9:15 AM Michał Górny via Phabricator < revi...@reviews.llvm.org> wrote: > mgorny updated this revision to Diff 109879. > mgorny added a comment. > > Forgive my poor eyesight, obviously this could go into existing LINK_LIBS > ;-). > > > https://reviews.llvm.org/D36358 > > Files: > source/Core/CMakeLists.txt > > > Index: source/Core/CMakeLists.txt > === > --- source/Core/CMakeLists.txt > +++ source/Core/CMakeLists.txt > @@ -62,6 +62,7 @@ > lldbPluginCPlusPlusLanguage > lldbPluginObjCLanguage > lldbPluginObjectFileJIT > +${CURSES_LIBRARIES} > >LINK_COMPONENTS > BinaryFormat > > > ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D36358: [lldb] [cmake] Add explicit linkage from Core to curses
Dnia 5 sierpnia 2017 19:33:57 CEST, Zachary Turner napisał(a): >Does this evaluate to nothing if curses is not present? I will test to confirm in a minute but it should since the find_package call responsible for defining it is conditional to the disable var. However, it may evaluate to a non-null value if a parent project uses curses. Maybe I should make it explicitly respect LLDB_DISABLE_NCURSES then? >On Sat, Aug 5, 2017 at 9:15 AM Michał Górny via Phabricator < >revi...@reviews.llvm.org> wrote: > >> mgorny updated this revision to Diff 109879. >> mgorny added a comment. >> >> Forgive my poor eyesight, obviously this could go into existing >LINK_LIBS >> ;-). >> >> >> https://reviews.llvm.org/D36358 >> >> Files: >> source/Core/CMakeLists.txt >> >> >> Index: source/Core/CMakeLists.txt >> === >> --- source/Core/CMakeLists.txt >> +++ source/Core/CMakeLists.txt >> @@ -62,6 +62,7 @@ >> lldbPluginCPlusPlusLanguage >> lldbPluginObjCLanguage >> lldbPluginObjectFileJIT >> +${CURSES_LIBRARIES} >> >>LINK_COMPONENTS >> BinaryFormat >> >> >> -- Best regards, Michał Górny (by phone) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D36358: [lldb] [cmake] Add explicit linkage from Core to curses
mgorny updated this revision to Diff 109897. mgorny edited the summary of this revision. mgorny added a comment. Updated to explicitly respect LLDB_DISABLE_CURSES and the LLVM HAVE_TERMINFO logic. https://reviews.llvm.org/D36358 Files: source/Core/CMakeLists.txt Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLDB_CURSES_LIBS) + +if (NOT LLDB_DISABLE_CURSES) + list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES}) + if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO) +list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS}) + endif() +endif() + add_lldb_library(lldbCore Address.cpp AddressRange.cpp @@ -62,6 +71,7 @@ lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage lldbPluginObjectFileJIT +${LLDB_CURSES_LIBS} LINK_COMPONENTS BinaryFormat Index: source/Core/CMakeLists.txt === --- source/Core/CMakeLists.txt +++ source/Core/CMakeLists.txt @@ -1,3 +1,12 @@ +set(LLDB_CURSES_LIBS) + +if (NOT LLDB_DISABLE_CURSES) + list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES}) + if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO) +list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS}) + endif() +endif() + add_lldb_library(lldbCore Address.cpp AddressRange.cpp @@ -62,6 +71,7 @@ lldbPluginCPlusPlusLanguage lldbPluginObjCLanguage lldbPluginObjectFileJIT +${LLDB_CURSES_LIBS} LINK_COMPONENTS BinaryFormat ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits