summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-09-21 21:02:16 +0000
committerChris Bieneman <beanz@apple.com>2016-09-21 21:02:16 +0000
commitd3199f5ed26469ba8af5ce9fd487bba4b579046d (patch)
tree4a0ff86ba7ce9a78f4c0e8cd419201af6e732b75 /lldb/scripts/Python
parent2c4d54f3260cc8d282ec0b4e6cd98fa01023716e (diff)
downloadbcm5719-llvm-d3199f5ed26469ba8af5ce9fd487bba4b579046d.tar.gz
bcm5719-llvm-d3199f5ed26469ba8af5ce9fd487bba4b579046d.zip
[CMake] Initial support for LLDB.framework
Summary: This patch adds a CMake option LLDB_BUILD_FRAMEWORK, which builds libLLDB as a macOS framework instead of as a *nix shared library. With this patch any LLDB executable that has the INCLUDE_IN_FRAMEWORK option set will be built into the Framework's resources directory, and a symlink to the exeuctable will be placed under the build directory's bin folder. Creating the symlinks allows users to run commands from the build directory without altering the workflow. The framework generated by this patch passes the LLDB test suite, but has not been tested beyond that. It is not expected to be fully ready to ship, but it is a first step. With this patch binaries that are placed inside the framework aren't being properly installed. Fixing that would increase the patch size significantly, so I'd like to do that in a follow-up. Reviewers: zturner, tfiala Subscribers: beanz, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D24749 llvm-svn: 282110
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/finishSwigPythonLLDB.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py
index 2b01c2a35b6..2c9d9f7044b 100644
--- a/lldb/scripts/Python/finishSwigPythonLLDB.py
+++ b/lldb/scripts/Python/finishSwigPythonLLDB.py
@@ -383,7 +383,7 @@ def make_symlink(
bMakeFileCalled = "-m" in vDictArgs
eOSType = utilsOsType.determine_os_type()
if not bMakeFileCalled:
- return (bOk, strErrMsg)
+ strBuildDir = os.path.join("..", "..", "..")
else:
# Resolve vstrSrcFile path relatively the build directory
if eOSType == utilsOsType.EnumOsType.Windows:
@@ -394,7 +394,7 @@ def make_symlink(
# On a UNIX style platform the vstrFrameworkPythonDir looks like:
# llvm/build/lib/python2.7/site-packages/lldb
strBuildDir = os.path.join("..", "..", "..", "..")
- strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
+ strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
return make_symlink_native(vDictArgs, strSrc, strTarget)
@@ -434,7 +434,7 @@ def make_symlink_liblldb(
bMakeFileCalled = "-m" in vDictArgs
if not bMakeFileCalled:
- strSrc = os.path.join(vstrLldbLibDir, "LLDB")
+ strSrc = "LLDB"
else:
strLibFileExtn = ""
if eOSType == utilsOsType.EnumOsType.Windows:
@@ -724,7 +724,7 @@ def get_framework_python_dir_other_platforms(vDictArgs):
# We are being built by XCode, so all the lldb Python files can go
# into the LLDB.framework/Resources/Python subdirectory.
strWkDir = vDictArgs["--targetDir"]
- strWkDir += os.path.join(strWkDir, "LLDB.framework")
+ strWkDir = os.path.join(strWkDir, "LLDB.framework")
if os.path.exists(strWkDir):
if bDbg:
print((strMsgFoundLldbFrameWkDir % strWkDir))
OpenPOWER on IntegriCloud