<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Texte brut Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.TextebrutCar
{mso-style-name:"Texte brut Car";
mso-style-priority:99;
mso-style-link:"Texte brut";
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR-CA" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-CA" style="color:#1F4E79;mso-style-textfill-fill-color:#1F4E79;mso-style-textfill-fill-alpha:100.0%">Hi Larry,
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA" style="color:#1F4E79;mso-style-textfill-fill-color:#1F4E79;mso-style-textfill-fill-alpha:100.0%"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA" style="color:#1F4E79;mso-style-textfill-fill-color:#1F4E79;mso-style-textfill-fill-alpha:100.0%">Like Pavel suggests, the option for installing Python debug binaries is here:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span style="mso-fareast-language:FR-CA"><img width="666" height="410" style="width:6.9375in;height:4.2708in" id="Image_x0020_1" src="cid:image001.png@01D57206.80F88AC0"></span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">You would need to re-start the Python installer, and choose “Customize installation”, then you get an “Optional features” page, then a second menu page “Advanced Options” where you need to select
“Download debug binaries”. This will create the python_d.exe that LLDB needs. Ensure that
</span><span lang="EN-CA" style="font-family:Courier">-DPYTHON_HOME </span><span lang="EN-CA" style="color:#1F497D">properly points to the folder that you choose during installation. Also ensure that you have the
<a href="http://gnuwin32.sourceforge.net/">GnuWin32</a> tools installed and visible in %PATH%, otherwise the LLDB tests won’t work.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Alex.</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA" style="mso-fareast-language:FR-CA">-----Message d'origine-----<br>
De : lldb-dev <lldb-dev-bounces@lists.llvm.org> De la part de Pavel Labath via lldb-dev<br>
Envoyé : September 23, 2019 7:56 AM<br>
À : Larry D'Anna <lawrence_danna@apple.com>; lldb-dev@lists.llvm.org<br>
Objet : Re: [lldb-dev] help, how to get a debug build on windows (python37_d.lib)</span><span lang="EN-CA"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-CA"><o:p> </o:p></span></p>
<p class="MsoPlainText">On 22/09/2019 20:20, Larry D'Anna via lldb-dev wrote:<o:p></o:p></p>
<p class="MsoPlainText">> Hi lldb-dev.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I can’t seem to figure out how to build a debug lldb on windows. It
<o:p></o:p></p>
<p class="MsoPlainText">> wants to link against a debug version of Python, which isn’t there.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> My cmake line looks like this:<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> cmake -G Ninja `<o:p></o:p></p>
<p class="MsoPlainText">> "-DPYTHON_HOME=C:\Program Files (x86)\Microsoft Visual
<o:p></o:p></p>
<p class="MsoPlainText">> Studio\Shared\Python37_64" `<o:p></o:p></p>
<p class="MsoPlainText">> "-DLLVM_ENABLE_PROJECTS=clang;lldb;libcxx;libcxxabi;lld" `
<o:p></o:p></p>
<p class="MsoPlainText">> "-DSWIG_EXECUTABLE=C:\ProgramData\chocolatey\bin\swig.exe" `<o:p></o:p></p>
<p class="MsoPlainText">> "C:\Users\smoofra\llvm-project\llvm"<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> I also made this change, to tell it to link against the release python.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> --- a/lldb/cmake/modules/LLDBConfig.cmake<o:p></o:p></p>
<p class="MsoPlainText">> +++ b/lldb/cmake/modules/LLDBConfig.cmake<o:p></o:p></p>
<p class="MsoPlainText">> @@ -227,7 +227,7 @@ function(find_python_libs_windows)<o:p></o:p></p>
<p class="MsoPlainText">> else()<o:p></o:p></p>
<p class="MsoPlainText">> # Lookup for concrete python installation depending on build
<o:p></o:p></p>
<p class="MsoPlainText">> type<o:p></o:p></p>
<p class="MsoPlainText">> if (CMAKE_BUILD_TYPE STREQUAL Debug)<o:p></o:p></p>
<p class="MsoPlainText">> - set(LOOKUP_DEBUG_PYTHON TRUE)<o:p></o:p></p>
<p class="MsoPlainText">> + set(LOOKUP_DEBUG_PYTHON FALSE)<o:p></o:p></p>
<p class="MsoPlainText">> else()<o:p></o:p></p>
<p class="MsoPlainText">> set(LOOKUP_DEBUG_PYTHON FALSE)<o:p></o:p></p>
<p class="MsoPlainText">> endif()<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> But somehow at the very end, the link still fails because
<o:p></o:p></p>
<p class="MsoPlainText">> python37_d.lib isn’t there.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText">> Anybody know what I’m doing wrong? Thank you.<o:p></o:p></p>
<p class="MsoPlainText">> <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Hi Larry,<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I don't know the full details, but it is my understanding that due to how windows runtime libraries work (they have a separate debug and release CRT), all libraries in a single application need be linked against the same CRT flavour.
IIRC, the default python installation does not come with a debug python, but it should be possible to install it somehow (possibly via checking some box in the installation dialog, but I don't remember the details).<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">It should also be possible to create a "fake" debug build by setting the CMAKE_BUILD_TYPE to Release, and enabling debug info (and disabling<o:p></o:p></p>
<p class="MsoPlainText">optimizations) via CMAKE_CXX_FLAGS, but it's probably better to just get the debug python installed.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">pl<o:p></o:p></p>
<p class="MsoPlainText">_______________________________________________<o:p></o:p></p>
<p class="MsoPlainText">lldb-dev mailing list<o:p></o:p></p>
<p class="MsoPlainText"><a href="mailto:lldb-dev@lists.llvm.org"><span style="color:windowtext;text-decoration:none">lldb-dev@lists.llvm.org</span></a><o:p></o:p></p>
<p class="MsoPlainText"><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev"><span style="color:windowtext;text-decoration:none">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</span></a><o:p></o:p></p>
</div>
</body>
</html>