How to tell CMake on windows to use the compiler to call the linker

I have a Toolchain file, which sets my preferred compiler to clang-cl and the linker to lld-link

But, when I want to use -fsanitize=address, lld-link does not know the correct location of the sanitzer runtime library. clang++ could know where to find it, but it is only used on linux to call the linker.

My question is, how I can force cmake, to call the Linker via the compiler, e.g. using clang-cl -fuse-ld=lld.


This is tracked in CMake Issue 24243. See this post for a possible path forward.