File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,22 @@ pub struct Generator {
361361
362362impl Drop for Generator {
363363 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+:
366372 // https://github.com/KyleMayes/clang-rs/issues/63
367373 // So we avoid dropping clang in that case as a workaround.
368374 // `clang::get_version()` is string like "Apple clang version 15.0.0 (clang-1500.1.0.2.5)"
369375 unsafe {
370376 ManuallyDrop :: drop ( & mut self . clang ) ;
371377 }
378+ } else {
379+ eprintln ! ( "=== Windows + clang-runtime + clang version is known to be problematic, skipping drop of Generator" ) ;
372380 }
373381 }
374382}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ elif [[ "$os_family" == "macOS" ]]; then
3131 " $ci_dir /install-macos-framework.sh"
3232 fi
3333elif [[ " $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
3535 if [[ " ${VCPKG_VERSION:- } " != " " ]]; then # vcpkg build
3636 " $ci_dir /install-windows-vcpkg.sh"
3737 else # chocolatey build
You can’t perform that action at this time.
0 commit comments