Building rust with LLVM/Clang Toolchain with MinGW

Hi. I'm not familiar with rust language and its ecosystem. One of the packages I use needs rust for building and during build, it complains about it cannot find libgcc. The thing is there is no libgcc. I'm using pure LLVM toolchain on top of MinGW. I'm getting this error when tryin to build rust from source too.

So my question is, how may I get rid of libgcc complaint and build rust without libgcc?

Thanks for answers.

What are you trying to build? The compiler itself, or some other project? What is your OS?

@alice MinGW is Minimalist Gnu for Windows.

@IdrisKalp I'm not aware of LibC++ toolchain for Rust. Only Visual Studio and GNU.

Windows. I am trying to build librsvg with precompiled rustc on x86_64-pc-windows-gnu arch and it complains about it cannot find libgcc. Same error occurs when trying to build rust itself.

Then you probably want to make sure rustc uses your LLVM installation as its linker, and compiler for any C dependencies (librsvg depends on a few C libraries, like glib and libxml).

Set the environment variables RUSTFLAGS="-C linker=clang" and CC=clang