Lgtm<br><div class="gmail_quote">On Tue, Jun 2, 2015 at 9:59 PM Andrew Wilkins <<a href="mailto:axwalk@gmail.com">axwalk@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">================<br>
Comment at: scripts/Python/finishSwigPythonLLDB.py:307-308<br>
@@ -306,2 +306,4 @@<br>
         strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile));<br>
+        strTargetDir = os.path.dirname(strTarget);<br>
+        strSrc = os.path.relpath(os.path.abspath(strSrc), strTargetDir);<br>
<br>
----------------<br>
zturner wrote:<br>
> 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?)<br>
Without this change, the "lib" symlink looks like this:<br>
```<br>
$ readlink lib/python2.7/site-packages/lib<br>
../../../../lib<br>
```<br>
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.<br>
<br>
This change makes the source relative to the target, since that's how the symlink will be followed.<br>
<br>
================<br>
Comment at: scripts/Python/finishSwigPythonLLDB.py:376-380<br>
@@ -373,1 +375,7 @@<br>
<br>
+    # Create a symlink to the "lib" directory, to ensure liblldb's RPATH is<br>
+    # effective.<br>
+    bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, "lib", os.path.join("../lib") );<br>
+    if not bOk:<br>
+        return (bOk, strErrMsg)<br>
+<br>
----------------<br>
zturner wrote:<br>
> I think this shouldn't be done on Windows.  Windows doesn't have a notion of RPATH or LD_LIBRARY_PATH.<br>
Fixed.<br>
<br>
================<br>
Comment at: tools/lldb-server/CMakeLists.txt:32-34<br>
@@ -31,2 +31,5 @@<br>
   target_link_libraries(lldb-server liblldb)<br>
+  if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")<br>
+    target_link_libraries(lldb-server pthread)<br>
+  endif ()<br>
 else()<br>
----------------<br>
zturner wrote:<br>
> Should this be<br>
><br>
>     if (HAVE_LIBPTHREAD)<br>
><br>
> ?<br>
Done.<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10157&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=5wuG9oojLAQ-oLjrh-Jj2VCj3VCLnowk_HDC79QSCKg&s=Q2PlllteC68lIAupMcQ9iKG7tu5wAIm9xPTfiw9_Bk0&e=" target="_blank">http://reviews.llvm.org/D10157</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=5wuG9oojLAQ-oLjrh-Jj2VCj3VCLnowk_HDC79QSCKg&s=SbvadGYBrkeioWpO8tiNSavmI5qjtnyc-UI51HF6PhU&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>