Skip to content

Commit 5041fa3

Browse files
thesn10tritao
authored andcommitted
Update intrin.ps1
1 parent 8451cef commit 5041fa3

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

build/intrin.ps1

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
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+
}
412
}
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."
816
}

0 commit comments

Comments
 (0)