[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

Simon Tatham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 03:44:00 PDT 2018


simon_tatham added a comment.

> first check all directories in a fully case sensitive manner, just like today. And if that fails (and we'd have a real failure that we'd otherwise return to the caller), redo it all with case insensitivity.

I agree that the integration would be a bigger headache doing it that way. It would also depart from the expected semantics – a correctly cased header file in an include directory late on the path would override an incorrectly cased one earlier, which isn't how the real Windows compiler would handle the same situation.

> The cases where I would have needed this (the windows sdk), I'm not specifying that path explicitly via -I directives, but implicitly via the INCLUDE env variable

*blush* I //ought// to have thought of that, because I've noticed the same problem!

> but perhaps limiting this to the directories known to have problematic case could be helpful performance wise.

Yes. OK, in that case I think my proposed replacement design is to have an option along the lines of `-fwindows-paths=`//prefix// (spelling still open to change), with the effect that only pathname lookups starting with that prefix will be subject to this transformation.


Repository:
  rC Clang

https://reviews.llvm.org/D48626





More information about the cfe-commits mailing list