diff --git a/proto-cuda/windows-miner/start-mining.ps1 b/proto-cuda/windows-miner/start-mining.ps1 index 877071a91..405b4f8d1 100644 --- a/proto-cuda/windows-miner/start-mining.ps1 +++ b/proto-cuda/windows-miner/start-mining.ps1 @@ -116,9 +116,9 @@ if ($haveCl) { $libFirst = if ($env:LIB) { ($env:LIB -split ';')[0] } else { 'EMPTY' } $incFirst = if ($env:INCLUDE) { ($env:INCLUDE -split ';')[0] } else { 'EMPTY' } Log "MSVC environment: cl at $((Get-Command cl.exe).Source); LIB starts with $libFirst; INCLUDE starts with $incFirst" - # Always add the newest MSVC lib dir and the Windows Kits dirs in front of LIB: a vcvars import can leave LIB without - # the MSVC lib directory (seen on Josh's PC: LIB started with ucrt and nvcc's link failed on LIBCMT.lib). - [void](Set-LibFallback); Log ('LIB now starts with ' + (($env:LIB -split ';')[0])) + # The fallback only when the import left nothing: it would otherwise put the newest toolset's headers in front of + # INCLUDE and CUDA 12.8's cudafe++ crashes on those. The library path for nvcc's link step comes from build.bat itself. + if (-not $env:LIB) { Log 'LIB is empty: trying the fallback'; [void](Set-LibFallback) } } $haveNvcc = [bool](Get-Command nvcc.exe -ErrorAction SilentlyContinue) $openclSdk = $null