File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
- $intrin = ' C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include/intrin0.h'
2
- if (! (Test-Path $intrin )) {
3
- Write-Warning " This hack is no longer needed and should be removed."
1
+ $intrin = @ (
2
+ ' C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include/intrin0.h' ,
3
+ ' C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/include/intrin0.h' ,
4
+ ' C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29333/include/intrin0.h' )
5
+ $patched = $false
6
+ for ($i = 0 ; $i -lt $intrin.Length ; $i ++ ) {
7
+ if (Test-Path $intrin [$i ]) {
8
+ $content = ((Get-Content $intrin [$i ]) -replace ' ifdef __clang__' , ' ifdef __avoid_this_path__' )
9
+ [IO.File ]::WriteAllLines($intrin [$i ], $content )
10
+ $patched = $true
11
+ }
4
12
}
5
- else {
6
- $content = (( Get-Content $intrin ) -replace ' ifdef __clang__ ' , ' ifdef __avoid_this_path__ ' )
7
- [ IO.File ]::WriteAllLines( $intrin , $content )
13
+
14
+ if ( ! $patched ) {
15
+ Write-Warning " This hack is no longer needed and should be removed. "
8
16
}
You can’t perform that action at this time.
0 commit comments