This is an archive of the discontinued LLVM Phabricator instance.

add a dependency on terminfo library if llvm uses it
ClosedPublic

Authored by jeremi.piotrowski on Sep 7 2015, 4:37 AM.

Details

Summary

Ncurses related symbols can either all be found in libnurses or split between
libncurses and libtinfo. The main LLVM cmake scripts look for the setupterm
symbol and stores the library that has it in TERMINFO_LIBS. This covers the
split and unified ncurses case. LLDB uses symbols that can end up in libtinfo so
this library should be pulled in if it is found.

There is still an exotic case left where LLDB is configured with
-DLLDB_DISABLE_CURSES=NO and LLVM with -DLLVM_ENABLE_TERMINFO=NO but
misconfigurations will always be possible. Possibly a diagnostic could be added
for that.

This fixes bug 24693 (https://llvm.org/bugs/show_bug.cgi?id=24693).

Diff Detail

Event Timeline

jeremi.piotrowski retitled this revision from to add a dependency on terminfo library if llvm uses it.
jeremi.piotrowski updated this object.
jeremi.piotrowski added a subscriber: lldb-commits.
zturner edited edge metadata.Sep 7 2015, 12:51 PM
zturner added a subscriber: zturner.

Looks fine to me, but as a nitpick, I would suggest combining the nested if
into a single if with an AND clause.

jeremi.piotrowski edited edge metadata.
  • combine nested if conditions with and as suggested by zturner

    and remove condtition from endif as that seems to be the convention.

Looks fine, do you have commit access? If so feel free to commit
whenever. Otherwise I can do it for you tomorrow

I do not have commit access, so if you could do it for me that would be great.

clayborg accepted this revision.Sep 8 2015, 9:45 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Sep 8 2015, 9:45 AM
zturner closed this revision.Sep 16 2015, 1:15 PM

Sorry this took so long, I forgot about it. It has been committed in r247842.