[llvm] [wip] Apply all remaining LLVM_ABI annotations to build, tests, tools and benchmarks (PR #189946)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 05:08:41 PDT 2026


================
@@ -0,0 +1,61 @@
+name: Build LLVM as shared library on Windows
+on:
+  pull_request:
+    branches: [main]
+  push:
+    branches: [main]
+
+permissions:
+  contents: read
+
+jobs:
+  build-main:
+    name: Windows-LLVM-Shared-Library
+    runs-on: windows-2025
+
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+    - uses: actions/checkout at 8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
+      with:
+        path: ${{ github.workspace }}/llvm
+
+    - name: Setup compiler on Windows
+      run: |
+        $env:CC="clang-cl"
+        $env:CXX="clang-cl"
+        echo "CC=clang-cl" >> $env:GITHUB_ENV
+        echo "CXX=clang-cl" >> $env:GITHUB_ENV
+
+    - name: Install dependencies
+      run: |
+        choco install ninja
+
+    - name: Build LLVM as a shared library on Windows
+      run: |
+        function Error-On-Failure {
+          param (
+              [Parameter(Mandatory)]
+              [ScriptBlock]$Command
+          )
+
+         & $Command
+
+         if ($LASTEXITCODE -ne 0) {
+            exit $LASTEXITCODE
+         }
+        }
----------------
mcbarton wrote:

The purpose of this is to  act in the same way as `set -e` on Linux. I didn't know the equivalent on Windows, since I am not primarily a Windows developer. This was created by ChatGPT for me a long time ago. 

https://github.com/llvm/llvm-project/pull/189946


More information about the llvm-commits mailing list