Skip to content

Commit c351da6

Browse files
committed
fix(windows-build): stop patching llvm cmake configs
1 parent 8e02899 commit c351da6

1 file changed

Lines changed: 3 additions & 37 deletions

File tree

scripts/build-windows.ps1

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -143,43 +143,9 @@ Reset-BuildDirectoryIfGeneratorChanged `
143143
-PlatformName $platformForCache `
144144
-ToolsetName $toolsetForCache
145145

146-
# --- Patching Logic (LLVM 20.1.0 stale DIA path fix only) ---
147-
$diaguidsCandidate = Join-Path $vsPath "DIA SDK\lib\amd64\diaguids.lib"
148-
$staleDiaPath = "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib"
149-
$llvmExportsPath = Join-Path $initialLLVMDir "LLVMExports.cmake"
150-
151-
if ((Test-Path $llvmExportsPath) -and (Test-Path $diaguidsCandidate)) {
152-
$llvmExportsContent = Get-Content -Path $llvmExportsPath -Raw
153-
154-
if ($llvmExportsContent.Contains($staleDiaPath)) {
155-
Write-Host "Detected stale DIA SDK paths. Creating patched CMake files..."
156-
157-
$patchedRoot = Join-Path $resolvedBuildDir "__llvm_cmake_patched"
158-
$patchedLLVMDir = Join-Path $patchedRoot "llvm"
159-
$patchedClangDir = Join-Path $patchedRoot "clang"
160-
$replacementDiaPath = $diaguidsCandidate.Replace("\", "/")
161-
162-
New-PatchedCMakePackageDir `
163-
-SourceDir $initialLLVMDir `
164-
-DestinationDir $patchedLLVMDir `
165-
-OldValue $staleDiaPath `
166-
-NewValue $replacementDiaPath
167-
168-
if (Test-Path $initialClangDir) {
169-
New-PatchedCMakePackageDir `
170-
-SourceDir $initialClangDir `
171-
-DestinationDir $patchedClangDir `
172-
-OldValue $staleDiaPath `
173-
-NewValue $replacementDiaPath
174-
175-
$finalClangDir = $patchedClangDir
176-
} else {
177-
$finalClangDir = $patchedLLVMDir
178-
}
179-
180-
$finalLLVMDir = $patchedLLVMDir
181-
}
182-
}
146+
# --- No patching needed anymore ---
147+
$finalLLVMDir = $initialLLVMDir
148+
$finalClangDir = $initialClangDir
183149

184150
# --- Validate package files early ---
185151
$llvmConfigPath = Join-Path $finalLLVMDir "LLVMConfig.cmake"

0 commit comments

Comments
 (0)