[Lldb-commits] [PATCH] [lldb] Enable building with Cmake/BUILD_SHARED_LIBS

Zachary Turner zturner at google.com
Wed Jun 3 02:31:09 PDT 2015


Lgtm
On Tue, Jun 2, 2015 at 9:59 PM Andrew Wilkins <axwalk at gmail.com> wrote:

> ================
> Comment at: scripts/Python/finishSwigPythonLLDB.py:307-308
> @@ -306,2 +306,4 @@
>          strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile));
> +        strTargetDir = os.path.dirname(strTarget);
> +        strSrc = os.path.relpath(os.path.abspath(strSrc), strTargetDir);
>
> ----------------
> zturner wrote:
> > I'm having some trouble visualizing what this is doing.  What do a
> sample `strSrc` and `strTarget` look like before and after this change?
> (i.e. what was broken that this is fixing?)
> Without this change, the "lib" symlink looks like this:
> ```
> $ readlink lib/python2.7/site-packages/lib
> ../../../../lib
> ```
> which is one too many ".."s. The problem is that the symlinks are being
> created relative to site-packages/lldb, rather than where the symlink is
> located. It just happened that all the symlinks were in site-packages/lldb
> before.
>
> This change makes the source relative to the target, since that's how the
> symlink will be followed.
>
> ================
> Comment at: scripts/Python/finishSwigPythonLLDB.py:376-380
> @@ -373,1 +375,7 @@
>
> +    # Create a symlink to the "lib" directory, to ensure liblldb's RPATH
> is
> +    # effective.
> +    bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir,
> "lib", os.path.join("../lib") );
> +    if not bOk:
> +        return (bOk, strErrMsg)
> +
> ----------------
> zturner wrote:
> > I think this shouldn't be done on Windows.  Windows doesn't have a
> notion of RPATH or LD_LIBRARY_PATH.
> Fixed.
>
> ================
> Comment at: tools/lldb-server/CMakeLists.txt:32-34
> @@ -31,2 +31,5 @@
>    target_link_libraries(lldb-server liblldb)
> +  if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
> +    target_link_libraries(lldb-server pthread)
> +  endif ()
>  else()
> ----------------
> zturner wrote:
> > Should this be
> >
> >     if (HAVE_LIBPTHREAD)
> >
> > ?
> Done.
>
> http://reviews.llvm.org/D10157
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150603/6316639c/attachment.html>


More information about the lldb-commits mailing list