[PR #7407] [MERGED] Switch windows to clang #12410

Closed
opened 2026-04-12 23:58:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7407
Author: @dhiltgen
Created: 10/29/2024
Status: Merged
Merged: 10/29/2024
Merged by: @dhiltgen

Base: mainHead: win_unicode


📝 Commits (2)

  • 3bea335 Switch over to clang for deepseek on windows
  • 3136d52 Fail fast with wrong compiler on windows

📊 Changes

2 files changed (+10 additions, -3 deletions)

View changed files

📝 docs/development.md (+6 -3)
📝 llama/make/common-defs.make (+4 -0)

📄 Description

The recent deepseek patch for windows only works if built with clang.

CI changes carried on #7157 - it doesn't appear the clang installed in the standard github runner windows image has the gcc compat wrapper, so we'll use msys2 to get that installed. While make is already present, I went ahead and replicated the documented instructions for completeness.

      - name: Install msys2
        run: |
          $msys2_url="https://github.com/msys2/msys2-installer/releases/download/2024-07-27/msys2-x86_64-20240727.exe"
          write-host "Downloading msys2"
          Invoke-WebRequest -Uri "${msys2_url}" -OutFile "${env:RUNNER_TEMP}\msys2.exe"
          write-host "Installing msys2"
          Start-Process "${env:RUNNER_TEMP}\msys2.exe" -ArgumentList @("in", "--confirm-command", "--accept-messages", "--root", "C:/msys64") -NoNewWindow -Wait
          echo "c:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
      - name: Install msys2 tools
        run: |
          Start-Process "c:\msys64\usr\bin\pacman.exe" -ArgumentList @("-S", "--noconfirm", "mingw-w64-clang-x86_64-gcc-compat", "mingw-w64-clang-x86_64-clang", "make") -NoNewWindow -Wait
          echo "C:\msys64\clang64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
      - name: verify tools
        run: |
          get-command gcc
          gcc --version
          get-command make
          make --version

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/7407 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 10/29/2024 **Status:** ✅ Merged **Merged:** 10/29/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `win_unicode` --- ### 📝 Commits (2) - [`3bea335`](https://github.com/ollama/ollama/commit/3bea335680c250803ec9eaf49ca591fe61bfc3ff) Switch over to clang for deepseek on windows - [`3136d52`](https://github.com/ollama/ollama/commit/3136d52ef35f13d0ed6ea7434569bbcf8e65eb57) Fail fast with wrong compiler on windows ### 📊 Changes **2 files changed** (+10 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/development.md` (+6 -3) 📝 `llama/make/common-defs.make` (+4 -0) </details> ### 📄 Description The recent deepseek patch for windows only works if built with clang. CI changes carried on #7157 - it doesn't appear the clang installed in the standard github runner windows image has the gcc compat wrapper, so we'll use msys2 to get that installed. While make is already present, I went ahead and replicated the documented instructions for completeness. ```yaml - name: Install msys2 run: | $msys2_url="https://github.com/msys2/msys2-installer/releases/download/2024-07-27/msys2-x86_64-20240727.exe" write-host "Downloading msys2" Invoke-WebRequest -Uri "${msys2_url}" -OutFile "${env:RUNNER_TEMP}\msys2.exe" write-host "Installing msys2" Start-Process "${env:RUNNER_TEMP}\msys2.exe" -ArgumentList @("in", "--confirm-command", "--accept-messages", "--root", "C:/msys64") -NoNewWindow -Wait echo "c:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Install msys2 tools run: | Start-Process "c:\msys64\usr\bin\pacman.exe" -ArgumentList @("-S", "--noconfirm", "mingw-w64-clang-x86_64-gcc-compat", "mingw-w64-clang-x86_64-clang", "make") -NoNewWindow -Wait echo "C:\msys64\clang64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: verify tools run: | get-command gcc gcc --version get-command make make --version ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:58:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#12410