@@ -21,13 +21,13 @@ jobs:
2121 fail-fast : false
2222 matrix :
2323 include :
24- - name : win2025-msvc-clang-repl-19
24+ - name : win2025-shared-lib
2525 os : windows-2025
26- compiler : msvc
27- clang-runtime : ' 19 '
26+ compiler : clang
27+ clang-runtime : ' 20 '
2828 cling : Off
2929 llvm_enable_projects : " clang"
30- llvm_targets_to_build : " host;NVPTX "
30+ llvm_targets_to_build : " host"
3131
3232 steps :
3333 - uses : actions/checkout@v4
7373 path : |
7474 llvm-project
7575 ${{ matrix.cling=='On' && 'cling' || '' }}
76- key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
76+ key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}-shared-lib
7777 lookup-only : true
7878
7979 - name : Setup default Build Type on Windows
@@ -93,10 +93,10 @@ jobs:
9393 choco install llvm --version=$ver --no-progress -my
9494 clang --version
9595 #
96- $env:CC="clang"
97- $env:CXX="clang++ "
98- echo "CC=clang" >> $env:GITHUB_ENV
99- echo "CXX=clang++ " >> $env:GITHUB_ENV
96+ $env:CC="clang-cl "
97+ $env:CXX="clang-cl "
98+ echo "CC=clang-cl " >> $env:GITHUB_ENV
99+ echo "CXX=clang-cl " >> $env:GITHUB_ENV
100100 }
101101 elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
102102 {
@@ -111,7 +111,9 @@ jobs:
111111 if : ${{ steps.cache.outputs.cache-hit != 'true' }}
112112 run : |
113113 choco install findutils
114+ choco install ninja
114115 $env:PATH="C:\Program Files (x86)\GnuWin32\bin;$env:PATH"
116+ $env:PATH="C:\Program Files (x86)\Ninja\bin;$env:PATH"
115117
116118 - name : Build LLVM/Cling on Windows systems if the cache is invalid
117119 if : ${{ steps.cache.outputs.cache-hit != 'true' }}
@@ -130,7 +132,7 @@ jobs:
130132 }
131133 else
132134 {
133- git clone --depth=1 -b release/${{ matrix.clang-runtime }}.x https://github.com/llvm /llvm-project.git
135+ git clone --depth=1 -b llvm-export-api-20.0 https://github.com/fsfod /llvm-project.git
134136 }
135137
136138 cd llvm-project
@@ -174,7 +176,7 @@ jobs:
174176 }
175177 cd build
176178 echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
177- cmake -DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
179+ cmake -G Ninja - DLLVM_ENABLE_PROJECTS="${{ matrix.llvm_enable_projects}}" `
178180 -DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
179181 -DCMAKE_BUILD_TYPE=Release `
180182 -DLLVM_ENABLE_ASSERTIONS=ON `
@@ -185,6 +187,15 @@ jobs:
185187 -DLLVM_ENABLE_ZSTD=OFF `
186188 -DLLVM_ENABLE_TERMINFO=OFF `
187189 -DLLVM_ENABLE_LIBXML2=OFF `
190+ -DLLVM_ENABLE_PLUGINS=On `
191+ -DLLVM_BUILD_LLVM_DYLIB=ON `
192+ -DLLVM_BUILD_LLVM_DYLIB_VIS=ON `
193+ -DLLVM_LINK_LLVM_DYLIB=ON `
194+ -DCLANG_LINK_CLANG_DYLIB=ON `
195+ -DCMAKE_ASM_MASM_COMPILER=llvm-ml `
196+ -DCMAKE_ASM_MASM_FLAGS="-m64" `
197+ -DCMAKE_CXX_COMPILER=clang-cl `
198+ -DCMAKE_C_COMPILER=clang-cl `
188199 ..\llvm
189200 cmake --build . --config Release --target clang clangInterpreter clangStaticAnalyzerCore --parallel ${{ env.ncpus }}
190201 }
@@ -225,10 +236,10 @@ jobs:
225236 fail-fast : false
226237 matrix :
227238 include :
228- - name : win2025-msvc-clang-repl-19
239+ - name : win2025-shared-lib
229240 os : windows-2025
230- compiler : msvc
231- clang-runtime : ' 19 '
241+ compiler : clang
242+ clang-runtime : ' 20 '
232243 cling : Off
233244 cppyy : Off
234245
@@ -284,10 +295,10 @@ jobs:
284295 choco install llvm --version=$ver --no-progress -my
285296 clang --version
286297 #
287- $env:CC="clang"
288- $env:CXX="clang++ "
289- echo "CC=clang" >> $env:GITHUB_ENV
290- echo "CXX=clang++ " >> $env:GITHUB_ENV
298+ $env:CC="clang-cl "
299+ $env:CXX="clang-cl "
300+ echo "CC=clang-cl " >> $env:GITHUB_ENV
301+ echo "CXX=clang-cl " >> $env:GITHUB_ENV
291302 }
292303 elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
293304 {
@@ -298,14 +309,20 @@ jobs:
298309 echo "Unsupported compiler - fix YAML file"
299310 }
300311
312+ - name : Install deps on Windows
313+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
314+ run : |
315+ choco install ninja
316+ $env:PATH="C:\Program Files (x86)\Ninja\bin;$env:PATH"
317+
301318 - name : Restore Cache LLVM/Clang runtime build directory
302319 uses : actions/cache/restore@v4
303320 id : cache
304321 with :
305322 path : |
306323 llvm-project
307324 ${{ matrix.cling=='On' && 'cling' || '' }}
308- key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
325+ key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}-shared-lib
309326
310327 - name : Build and Test/Install CppInterOp on Windows systems
311328 run : |
@@ -367,9 +384,10 @@ jobs:
367384 }
368385 else
369386 {
370- cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
387+ cmake -G Ninja - DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
371388 -DLLVM_DIR="$env:LLVM_BUILD_DIR\lib\cmake\llvm" `
372389 -DLLVM_ENABLE_WERROR=On `
390+ -DBUILD_SHARED_LIBS=ON `
373391 -DClang_DIR="$env:LLVM_BUILD_DIR\lib\cmake\clang" -DCODE_COVERAGE=${{ env.CODE_COVERAGE }} -DCMAKE_INSTALL_PREFIX="$env:CPPINTEROP_DIR" ..\
374392 cmake --build . --config ${{ env.BUILD_TYPE }} --target googletest --parallel ${{ env.ncpus }}
375393 }
0 commit comments