<div dir="ltr"><div><div><div>Hi,<br><br></div>I'm planning to take a much-needed look at MinGW(-w64) compatibility in the Clang driver. What I'm hoping to accomplish is the following:<br></div>1. allow 'clang -target [i686,x86_64]-w64-mingw32' to:<br>
1a) search /usr/[i686,x86_64]-w64-mingw32/[include,lib] and certain subdirectories for C(++) headers and libraries,<br></div><div>1b) use [i686,x86_64]-w64-mingw32-[as,ld,...] instead of what is currently (as of Clang 3.3 in my Arch Linux installation, will soon test a top of trunk build) [as,ld,...]<br>
</div><div>1c) set the necessary libraries to link in various situations.<br></div><div>2) Build a toolchain:<br>2a) that uses GNU binutils, Clang, and GNU libgcc/libstdc++ and make it work.<br></div><div>2b) that uses GNU binutils, Clang, LLVM compiler-rt, and GNU libstdc++ and make it work.<br>
<br></div><div>For this, I'd like to introduce a new Toolchain subclass, MinGWToolchain, which takes care of the *-*-mingw32 triplets.<br><br></div><div>I'm unsure of several things:<br></div><div>1) where is the target triple "converted" into a Toolchain instance?<br>
</div><div>2) how can I pass triplet-specific include dirs at configure/cmake time? This would not really be necessary, but actually really is if Clang is to be used as an "ultra-cross"-compiler targetting every triplet under the sun from one binary (which is an awesome idea).<br>
<br></div><div>I have read the sparse Driver documentation, and unfortunately not found an answer to the above issues. I would appreciate any substantial help anyone can give me in these departments. I'd like to do this right so the changes can stay (unlike my previous InitHeaderSearch hacks)<br>
<br></div><div>Thanks!<br><br>Ruben<br><br></div><div>PS: I'm not subscribed to cfe-dev, please CC me directly.<br></div></div>