From d3199f5ed26469ba8af5ce9fd487bba4b579046d Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 21 Sep 2016 21:02:16 +0000 Subject: [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 --- lldb/scripts/Python/finishSwigPythonLLDB.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/scripts/Python/finishSwigPythonLLDB.py') diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py index 2b01c2a..2c9d9f7 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)) -- cgit v1.1