[PATCH] D45152: [MinGW] Add option for disabling looking for a mingw gcc in PATH

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 5 02:02:35 PDT 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D45152#1057787, @martell wrote:

> @mstorsjo I would much prefer to detect the clang sysroot first and if that exists just ignore the gcc one.
>  Most of the time clang and gcc will be in the same bin folder and in the case where the clang sysroot with mingw prefix folders is not found we can just default back to the default gcc behavior.
>  This should cover the use case for existing gcc users while not blocking us to move forward with clang only toolchains.


That's probably an even better idea - I'll give that a try.

> If someone really wants to ignore the clang sysroot with mingw folders we could add a flag for that and not the other way around.
>  What are your thoughts here?

I guess that could be useful in theory, but I'd hold off adding that until there's a concrete need for that case (it sounds quite contrieved to me, and there's always the `--sysroot=` option).

> Though I do like the idea of having an `--assume-sysroot-bin` as an option for all toolchains

Well ideally all toolchains should use similar logic for finding sysroots, except for cases where they by design are different. I haven't looked for how many other cases of similar logic there is.


Repository:
  rC Clang

https://reviews.llvm.org/D45152





More information about the cfe-commits mailing list