diff options
author | Andrew Wilkins <axwalk@gmail.com> | 2015-06-04 03:12:37 +0000 |
---|---|---|
committer | Andrew Wilkins <axwalk@gmail.com> | 2015-06-04 03:12:37 +0000 |
commit | 7175f16cdbb480fc96a830f0ce0daa8e4e533c42 (patch) | |
tree | 1cb04fe9a49415624321aa7dcccb86b0c31699c3 /lldb/scripts/Python/finishSwigPythonLLDB.py | |
parent | d31203ae218637b8bb44824c9a7c63b1241fee8a (diff) | |
download | llvm-7175f16cdbb480fc96a830f0ce0daa8e4e533c42.zip llvm-7175f16cdbb480fc96a830f0ce0daa8e4e533c42.tar.gz llvm-7175f16cdbb480fc96a830f0ce0daa8e4e533c42.tar.bz2 |
[lldb] Enable building with Cmake/BUILD_SHARED_LIBS
Summary:
Several changes to fix CMake builds of LLDB with the
BUILD_SHARED_LIBS setting on.
- Force all internal libraries to be built STATIC.
- Add additional library dependencies (pthread, dl,
runtimedyld).
- modify finalisation of SWIG wrapper to symlink the
"lib" dir into python/site-packages, so _lldb.so's
RPATH resolves.
Test Plan: Verified one test case with "dotest.py".
Reviewers: sylvestre.ledru, zturner
Reviewed By: zturner
Subscribers: zturner, ted, tberghammer, emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D10157
llvm-svn: 239007
Diffstat (limited to 'lldb/scripts/Python/finishSwigPythonLLDB.py')
-rw-r--r-- | lldb/scripts/Python/finishSwigPythonLLDB.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py index 30759b5..cf05cc9 100644 --- a/lldb/scripts/Python/finishSwigPythonLLDB.py +++ b/lldb/scripts/Python/finishSwigPythonLLDB.py @@ -304,6 +304,8 @@ def make_symlink( vDictArgs, vstrFrameworkPythonDir, vstrSrcFile, vstrTargetFile # llvm/build/lib/python2.7/site-packages/lldb strBuildDir = os.path.join("..", "..", "..", ".."); strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile)); + strTargetDir = os.path.dirname(strTarget); + strSrc = os.path.relpath(os.path.abspath(strSrc), strTargetDir); if eOSType == utilsOsType.EnumOsType.Unknown: bOk = False; @@ -371,6 +373,13 @@ def make_symlink_liblldb( vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName strLibFileExtn = ".so"; strSrc = os.path.join("lib", "liblldb" + strLibFileExtn); + if eOSType != utilsOsType.EnumOsType.Windows: + # 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) + bOk, strErrMsg = make_symlink( vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget ); return (bOk, strErrMsg); |