how to configure linker on Windows

d:\>set CC="d:\Ruby30-x64\msys64\mingw64\bin\ld.exe"

d:\>crystal eval "puts 2+2"
Regex match error: UTF-8 error: byte 2 top bits not 0x80 (ArgumentError)
  from a\crystal\crystal\src\regex\pcre2.cr:276 in 'match_data'
  from a\crystal\crystal\src\regex.cr:614 in 'match_at_byte_index'
  from a\crystal\crystal\src\string.cr:2868 in 'gsub'
  from a\crystal\crystal\src\compiler\crystal\compiler.cr:285 in 'codegen'
  from a\crystal\crystal\src\compiler\crystal\compiler.cr:172 in 'compile:combine_rpath'
  from a\crystal\crystal\src\compiler\crystal\codegen\link.cr:148 in 'compile:combine_rpath'
  from a\crystal\crystal\src\compiler\crystal\command\eval.cr:30 in 'eval'
  from a\crystal\crystal\src\compiler\crystal.cr:11 in '__crystal_main'
  from a\crystal\crystal\src\crystal\main.cr:141 in 'main'
  from a\crystal\crystal\src\crystal\system\win32\wmain.cr:37 in 'wmain'
  from a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 in '__scrt_common_main_seh'
  from C:\Windows\System32\KERNEL32.DLL +97236 in 'BaseThreadInitThunk'
  from C:\Windows\SYSTEM32\ntdll.dll +446161 in 'RtlUserThreadStart'
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

so linker is configurable, but mingw won’t work out of box