@@ -40,7 +40,7 @@ function Read-LlvmMingwMetadata {
4040 if ($metadata.release -notmatch ' ^[0-9]{8}$' -or $metadata.llvm -notmatch ' ^[0-9]+$' ) {
4141 throw " LLVM MinGW release and LLVM version fields are invalid."
4242 }
43- if ($metadata.crt -ne " ucrt" -or $metadata.schema -ne " 3 " ) {
43+ if ($metadata.crt -ne " ucrt" -or $metadata.schema -ne " 2 " ) {
4444 throw " LLVM MinGW CRT or metadata schema is unsupported."
4545 }
4646 foreach ($checksumField in " x64_sha256" , " arm64_sha256" ) {
@@ -102,8 +102,6 @@ function Assert-LlvmMingwLayout {
102102 " LICENSE.TXT" ,
103103 " bin\cc.exe" ,
104104 " bin\clang-$LlvmVersion .exe" ,
105- " bin\mingw32-common.cfg" ,
106- " bin\$TargetArchitecture -w64-windows-gnu.cfg" ,
107105 " bin\llvm-ar.exe" ,
108106 " bin\ld.lld.exe" ,
109107 " bin\libLLVM-$LlvmVersion .dll" ,
@@ -144,24 +142,27 @@ function Install-LlvmMingwToolchain {
144142 $archivePath = Join-Path $archiveDirectory $assetName
145143 $toolchainRoot = Join-Path $cacheRoot " $ ( $metadata.release ) -$ ( $metadata.crt ) -$ ( $hostConfiguration.AssetArchitecture ) "
146144 $markerPath = Join-Path $toolchainRoot " .dynlex-llvm-mingw"
147- $markerFields = @ (
145+ $markerContents = @ (
146+ " schema=$ ( $metadata.schema ) " ,
148147 " release=$ ( $metadata.release ) " ,
149148 " sha256=$expectedChecksum " ,
150149 " host=$ ( $hostConfiguration.AssetArchitecture ) " ,
151150 " target=$ ( $hostConfiguration.TargetTriple ) "
152- )
153- $markerContents = (@ (" schema=$ ( $metadata.schema ) " ) + $markerFields ) -join " `n "
154- $previousMarkerContents = @ (
155- (@ (" schema=1" ) + $markerFields ) -join " `n "
156- (@ (" schema=2" ) + $markerFields ) -join " `n "
157- )
151+ ) -join " `n "
152+ $schemaOneMarkerContents = @ (
153+ " schema=1" ,
154+ " release=$ ( $metadata.release ) " ,
155+ " sha256=$expectedChecksum " ,
156+ " host=$ ( $hostConfiguration.AssetArchitecture ) " ,
157+ " target=$ ( $hostConfiguration.TargetTriple ) "
158+ ) -join " `n "
158159
159160 if (Test-Path $toolchainRoot ) {
160161 if (-not (Test-Path - PathType Leaf $markerPath )) {
161162 throw " LLVM MinGW cache directory exists without its integrity marker: $toolchainRoot "
162163 }
163164 $actualMarkerContents = (Get-Content $markerPath - Raw).TrimEnd()
164- if ($previousMarkerContents -contains $actualMarkerContents ) {
165+ if ($actualMarkerContents -eq $schemaOneMarkerContents ) {
165166 Remove-Item - Recurse - Force $toolchainRoot
166167 } elseif ($actualMarkerContents -ne $markerContents ) {
167168 throw " LLVM MinGW cache integrity marker does not match the pinned toolchain."
@@ -209,8 +210,6 @@ function Install-LlvmMingwToolchain {
209210 foreach ($fileName in @ (
210211 " cc.exe" ,
211212 " clang-$ ( $metadata.llvm ) .exe" ,
212- " mingw32-common.cfg" ,
213- " $ ( $hostConfiguration.TargetArchitecture ) -w64-windows-gnu.cfg" ,
214213 " llvm-ar.exe" ,
215214 " ld.lld.exe" ,
216215 " libLLVM-$ ( $metadata.llvm ) .dll" ,
0 commit comments