aadsm added a comment.

> The proposed path in this patch, -rpath "@loader_path/../../../", uses the 
> @loader_path expansion which is the directory containing the binary that the 
> load command is in (in this case liblldb's directory). Popping 3 directories 
> up from that is likely not sane in most build configurations, but if it works 
> for you meh...

This is exactly what Apple ships with Xcode today:

  $ otool -l 
/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/liblldbPluginScriptInterpreterPython3.dylib
 | grep RPATH -A 2
            cmd LC_RPATH
        cmdsize 72
           path @loader_path/../../../../../../../../Library/Frameworks/ 
(offset 12)
  --
            cmd LC_RPATH
        cmdsize 72
           path @loader_path/../../../../../Developer/Library/Frameworks/ 
(offset 12)
  --
            cmd LC_RPATH
        cmdsize 72
           path @loader_path/../../../../Developer/Library/Frameworks/ (offset 
12)
  --
            cmd LC_RPATH
        cmdsize 48
           path @loader_path/../../../../Frameworks (offset 12)
  --
            cmd LC_RPATH
        cmdsize 40
           path @loader_path/../../../ (offset 12)
  
  $ otool -L 
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Python3
  
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Python3:
        @rpath/Python3.framework/Versions/3.7/Python3 (compatibility version 
3.7.0, current version 3.7.0)

But they build liblldbPluginScriptInterpreterPython3 as a dylib instead of 
statically inside liblldb (so that they can have both 2.7 and 3.7).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69931/new/

https://reviews.llvm.org/D69931



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to