@@ -21,13 +21,13 @@ jobs:
21
21
fail-fast : false
22
22
matrix :
23
23
include :
24
- - name : win2025-msvc-clang-repl-19
24
+ - name : win2025-shared-lib
25
25
os : windows-2025
26
- compiler : msvc
27
- clang-runtime : ' 19 '
26
+ compiler : clang
27
+ clang-runtime : ' 20 '
28
28
cling : Off
29
29
llvm_enable_projects : " clang"
30
- llvm_targets_to_build : " host;NVPTX "
30
+ llvm_targets_to_build : " host"
31
31
32
32
steps :
33
33
- uses : actions/checkout@v4
73
73
path : |
74
74
llvm-project
75
75
${{ 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
77
77
lookup-only : true
78
78
79
79
- name : Setup default Build Type on Windows
@@ -93,10 +93,10 @@ jobs:
93
93
choco install llvm --version=$ver --no-progress -my
94
94
clang --version
95
95
#
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
100
100
}
101
101
elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
102
102
{
@@ -111,7 +111,9 @@ jobs:
111
111
if : ${{ steps.cache.outputs.cache-hit != 'true' }}
112
112
run : |
113
113
choco install findutils
114
+ choco install ninja
114
115
$env:PATH="C:\Program Files (x86)\GnuWin32\bin;$env:PATH"
116
+ $env:PATH="C:\Program Files (x86)\Ninja\bin;$env:PATH"
115
117
116
118
- name : Build LLVM/Cling on Windows systems if the cache is invalid
117
119
if : ${{ steps.cache.outputs.cache-hit != 'true' }}
@@ -130,7 +132,7 @@ jobs:
130
132
}
131
133
else
132
134
{
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
134
136
}
135
137
136
138
cd llvm-project
@@ -174,7 +176,7 @@ jobs:
174
176
}
175
177
cd build
176
178
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}}" `
178
180
-DLLVM_TARGETS_TO_BUILD="${{ matrix.llvm_targets_to_build }}" `
179
181
-DCMAKE_BUILD_TYPE=Release `
180
182
-DLLVM_ENABLE_ASSERTIONS=ON `
@@ -185,6 +187,15 @@ jobs:
185
187
-DLLVM_ENABLE_ZSTD=OFF `
186
188
-DLLVM_ENABLE_TERMINFO=OFF `
187
189
-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 `
188
199
..\llvm
189
200
cmake --build . --config Release --target clang clangInterpreter clangStaticAnalyzerCore --parallel ${{ env.ncpus }}
190
201
}
@@ -225,10 +236,10 @@ jobs:
225
236
fail-fast : false
226
237
matrix :
227
238
include :
228
- - name : win2025-msvc-clang-repl-19
239
+ - name : win2025-shared-lib
229
240
os : windows-2025
230
- compiler : msvc
231
- clang-runtime : ' 19 '
241
+ compiler : clang
242
+ clang-runtime : ' 20 '
232
243
cling : Off
233
244
cppyy : Off
234
245
@@ -284,10 +295,10 @@ jobs:
284
295
choco install llvm --version=$ver --no-progress -my
285
296
clang --version
286
297
#
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
291
302
}
292
303
elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
293
304
{
@@ -298,14 +309,20 @@ jobs:
298
309
echo "Unsupported compiler - fix YAML file"
299
310
}
300
311
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
+
301
318
- name : Restore Cache LLVM/Clang runtime build directory
302
319
uses : actions/cache/restore@v4
303
320
id : cache
304
321
with :
305
322
path : |
306
323
llvm-project
307
324
${{ 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
309
326
310
327
- name : Build and Test/Install CppInterOp on Windows systems
311
328
run : |
@@ -367,9 +384,10 @@ jobs:
367
384
}
368
385
else
369
386
{
370
- cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
387
+ cmake -G Ninja - DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
371
388
-DLLVM_DIR="$env:LLVM_BUILD_DIR\lib\cmake\llvm" `
372
389
-DLLVM_ENABLE_WERROR=On `
390
+ -DBUILD_SHARED_LIBS=ON `
373
391
-DClang_DIR="$env:LLVM_BUILD_DIR\lib\cmake\clang" -DCODE_COVERAGE=${{ env.CODE_COVERAGE }} -DCMAKE_INSTALL_PREFIX="$env:CPPINTEROP_DIR" ..\
374
392
cmake --build . --config ${{ env.BUILD_TYPE }} --target googletest --parallel ${{ env.ncpus }}
375
393
}
0 commit comments