Linking error with python37_d.lib when building on windows

When building swift on my local windows machine, I get this error when linking liblldb.dll :

LINK: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\liblldb.rsp /out:bin\liblldb.dll /implib:lib\liblldb.lib /pdb:bin\liblldb.pdb /dll /version:10.0 /INCREMENTAL:NO /debug /MANIFEST /MANIFESTFILE:bin\liblldb.dll.manifest" failed (exit code 1104) with the following output:

LINK : fatal error LNK1104: cannot open file 'python37_d.lib'

I find it strange since the LLDB_DISABLE_PYTHON has been set to YES.

Strangely, here the error I get with CMake :

    CMake Warning:

      Manually-specified variables were not used by the project:


I also tried to set SWIFT_BUILD_DISABLE_LLDB_PYTHON_SCRIPTS but, doesn't seem to help.

Any ideas ?

@JDevlieghere changed the LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHON. You should add a LLDB_ENABLE_PYTHON=NO to the cmake invocation, the docs should be updated for this.

The reason that the python support is disabled is purely to avoid having to install Python manually. If you are willing to go to and download the installer and run that, it will provide the necessary libraries for python.

I think we also need to add this to the cmake invocation :

    -C S:\windows-swift\cmake\caches\toolchain-5.2.cmake


Ah, right! The point of that was to actually disable the python support on 5.2. However, with the 5.3 release, I am attempting to enable the python support on the release builds so that the formatters for the LLDB REPL can be used.

It works !

Thanks for your time.