diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index d9203b9e..5373ac81 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -40,6 +40,11 @@ jobs: ) endlocal + - name: Fix intrin.h file + if: matrix.config.vs > 0 + shell: powershell + run: build/intrin.ps1 + - name: Clone LLVM shell: bash run: build/premake.sh --file=build/scripts/LLVM.lua clone_llvm diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38c87fe0..b3311d13 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,11 @@ jobs: shell: bash run: echo "/c/Program Files (x86)/Microsoft Visual Studio/$VS_VERSION/Enterprise/MSBuild/Current/Bin" >> $GITHUB_PATH + - name: Fix intrin.h file + if: matrix.config.vs > 0 + shell: powershell + run: build/intrin.ps1 + - name: Setup shell: bash run: build/Setup.sh diff --git a/build/intrin.ps1 b/build/intrin.ps1 new file mode 100644 index 00000000..27ae958b --- /dev/null +++ b/build/intrin.ps1 @@ -0,0 +1,8 @@ +$intrin = 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include/intrin0.h' +if (!(Test-Path $intrin)) { + Write-Warning "This hack is no longer needed and should be removed." +} +else { + $content = ((Get-Content $intrin) -replace 'ifdef __clang__', 'ifdef __avoid_this_path__') + [IO.File]::WriteAllLines($intrin, $content) +}