[Lldb-commits] [PATCH] D68719: Fix build with Visual Studio
Tatyana Krasnukha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 9 11:26:43 PDT 2019
tatyana-krasnukha created this revision.
tatyana-krasnukha added a reviewer: hhb.
tatyana-krasnukha added a project: LLDB.
Herald added subscribers: lldb-commits, JDevlieghere.
The script failed to make a symlink for liblldb.dll because it tried to find it in //__build_root__/bin// whereas Visual Studio places it in //__build_root__/Debug/bin// (for Debug configuration).
Repository:
rLLDB LLDB
https://reviews.llvm.org/D68719
Files:
finishSwigPythonLLDB.py
Index: finishSwigPythonLLDB.py
===================================================================
--- finishSwigPythonLLDB.py
+++ finishSwigPythonLLDB.py
@@ -332,12 +332,18 @@
bDbg = "-d" in vDictArgs
bOk = True
strErrMsg = ""
+ strPrefix = vDictArgs['--prefix']
target_filename = os.path.basename(strTarget)
if eOSType == utilsOsType.EnumOsType.Unknown:
bOk = False
strErrMsg = strErrMsgOsTypeUnknown
elif eOSType == utilsOsType.EnumOsType.Windows:
+ strBuildCfgDir = vDictArgs['--cmakeBuildConfiguration']
+
+ strSrc = os.path.normcase(os.path.join(strPrefix, strBuildCfgDir, strSrc))
+ strSrc = os.path.relpath(strSrc, os.path.dirname(strTarget))
+
if bDbg:
print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
bOk, strErrMsg = make_symlink_windows(strSrc,
@@ -347,6 +353,10 @@
if bDbg:
print((strMsgSymlinkExists % target_filename))
return (bOk, strErrMsg)
+
+ strSrc = os.path.normcase(os.path.join(strPrefix, strSrc))
+ strSrc = os.path.relpath(strSrc, os.path.dirname(strTarget))
+
if bDbg:
print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
bOk, strErrMsg = make_symlink_other_platforms(strSrc,
@@ -373,13 +383,10 @@
dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink()")
strTarget = os.path.join(vstrFrameworkPythonDir, vstrTargetFile)
strTarget = os.path.normcase(strTarget)
- strPrefix = vDictArgs['--prefix']
os.chdir(vstrFrameworkPythonDir)
- strSrc = os.path.normcase(os.path.join(strPrefix, vstrSrcFile))
- strRelSrc = os.path.relpath(strSrc, os.path.dirname(strTarget))
- return make_symlink_native(vDictArgs, strRelSrc, strTarget)
+ return make_symlink_native(vDictArgs, vstrSrcFile, strTarget)
#++---------------------------------------------------------------------------
# Details: Make the symbolic that the script bridge for Python will need in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68719.224107.patch
Type: text/x-patch
Size: 2081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191009/d3c1a9d9/attachment.bin>
More information about the lldb-commits
mailing list