[Lldb-commits] [PATCH] D16293: [cmake] Make dependencies of lldb libraries private

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 20 10:14:26 PST 2016


zturner added a comment.

I get linker errors on Windows with this.  The reason is that Windows doesn't have getopt, but getopt is called from from Driver.cpp and linked into the main lldb executable.  Since liblldb is built as a shared library, when the keyword is public it's linking the liblldb inputs into the executable, which works.  But when liblldb uses the private keyword, then the inputs don't get fed into lldb.exe and it fails to link.

A better solution would involve layering the windows getopt implementation more appropriately so that it could just be linked directly into lldb.exe.  But for now, I think you will need to put this keyword change behind an OS flag so that it continues to use public on Windows (perhaps with a comment explaining why this is necessary)


http://reviews.llvm.org/D16293





More information about the lldb-commits mailing list