I seem to recall that you guys didn't want to use --sysroot to point to the mingw installation. The Generic_GCC toolchain respects a --gcc-toolchain= flag which could be used to select a mingw installation instead. http://reviews.llvm.org/D3420