File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,22 @@ pub struct Generator {
361
361
362
362
impl Drop for Generator {
363
363
fn drop ( & mut self ) {
364
- if !( cfg ! ( windows) && cfg ! ( feature = "clang-runtime" ) && clang:: get_version ( ) . contains ( " 19." ) ) {
365
- // `clang` has an issue on Windows when running with `runtime` feature and clang-19:
364
+ const BAD_VERSIONS : [ & str ; 2 ] = [ " 19." , " 20." ] ;
365
+ if !( cfg ! ( windows)
366
+ && cfg ! ( feature = "clang-runtime" )
367
+ && BAD_VERSIONS
368
+ . iter ( )
369
+ . any ( |bad_version| clang:: get_version ( ) . contains ( bad_version) ) )
370
+ {
371
+ // `clang` has an issue on Windows when running with `runtime` feature and clang-19+:
366
372
// https://github.com/KyleMayes/clang-rs/issues/63
367
373
// So we avoid dropping clang in that case as a workaround.
368
374
// `clang::get_version()` is string like "Apple clang version 15.0.0 (clang-1500.1.0.2.5)"
369
375
unsafe {
370
376
ManuallyDrop :: drop ( & mut self . clang ) ;
371
377
}
378
+ } else {
379
+ eprintln ! ( "=== Windows + clang-runtime + clang version is known to be problematic, skipping drop of Generator" ) ;
372
380
}
373
381
}
374
382
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ elif [[ "$os_family" == "macOS" ]]; then
31
31
" $ci_dir /install-macos-framework.sh"
32
32
fi
33
33
elif [[ " $os_family " == " Windows" ]]; then
34
- export CHOCO_LLVM_VERSION=19 .1.5 # https://community.chocolatey.org/packages/llvm#versionhistory
34
+ export CHOCO_LLVM_VERSION=20 .1.0 # https://community.chocolatey.org/packages/llvm#versionhistory
35
35
if [[ " ${VCPKG_VERSION:- } " != " " ]]; then # vcpkg build
36
36
" $ci_dir /install-windows-vcpkg.sh"
37
37
else # chocolatey build
You can’t perform that action at this time.
0 commit comments