Skip to content

Commit a8595fc

Browse files
josetrtritao
authored andcommitted
A temporary hack to deal with a bug in MSVC v142 - VS 2019 build tools
1 parent e637b18 commit a8595fc

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.github/workflows/llvm.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
)
4141
endlocal
4242
43+
- name: Fix intrin.h file
44+
if: matrix.config.vs > 0
45+
shell: powershell
46+
run: build/intrin.ps1
47+
4348
- name: Clone LLVM
4449
shell: bash
4550
run: build/premake.sh --file=build/scripts/LLVM.lua clone_llvm

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
shell: bash
3131
run: echo "/c/Program Files (x86)/Microsoft Visual Studio/$VS_VERSION/Enterprise/MSBuild/Current/Bin" >> $GITHUB_PATH
3232

33+
- name: Fix intrin.h file
34+
if: matrix.config.vs > 0
35+
shell: powershell
36+
run: build/intrin.ps1
37+
3338
- name: Setup
3439
shell: bash
3540
run: build/Setup.sh

build/intrin.ps1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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."
4+
}
5+
else {
6+
$content = ((Get-Content $intrin) -replace 'ifdef __clang__', 'ifdef __avoid_this_path__')
7+
[IO.File]::WriteAllLines($intrin, $content)
8+
}

0 commit comments

Comments
 (0)