Use clang-cl to build libyuv (#1930)
diff --git a/.github/workflows/ci-windows-artifacts.yml b/.github/workflows/ci-windows-artifacts.yml index 535d15c..af7aa61 100644 --- a/.github/workflows/ci-windows-artifacts.yml +++ b/.github/workflows/ci-windows-artifacts.yml
@@ -27,7 +27,7 @@ uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ext - key: ${{ runner.os }}-${{ hashFiles('ext/*.cmd') }}-somedeps + key: ${{ runner.os }}-${{ hashFiles('ext/*.cmd') }}-releasedeps - name: Print cmake version run: cmake --version - uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1 @@ -46,7 +46,19 @@ - name: Build libyuv if: steps.cache-ext.outputs.cache-hit != 'true' working-directory: ./ext - run: ./libyuv.cmd + # Use clang-cl to build libyuv. The assembly code in libyuv is written in the + # GCC inline assembly format. Visual C++ doesn't support GCC inline assembly. + # This is PowerShell syntax. + run: > + $Env:CC = 'clang-cl' + + $Env:CXX = 'clang-cl' + + ./libyuv.cmd + + $Env:CC = '' + + $Env:CXX = '' - name: Build libjpeg if: steps.cache-ext.outputs.cache-hit != 'true' working-directory: ./ext