[clang] [clang][driver] Prevent clang picking the system headers/libraries when started via a symlink (PR #68091)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 16:01:12 PDT 2023


nolange wrote:

> On the other hand; I agree that it's kinda implausible that this directory would exist at all anywhere else than next to the actual executable. In that case, perhaps those testcases are the only cases that would need to be handled after all?

If it exists this might cause someone unimaginable pain ;)

> @nolange - in your efforts in [mstorsjo/llvm-mingw#362](https://github.com/mstorsjo/llvm-mingw/issues/362) - do you rely on making a symlink to the system installed clang executable and locating sysroots and the clang `<base>/lib/clang` directory next to the symlink?

Nope, I use a script as I need to set `-resource-dir=`.

Btw. I understand this is only a bug on MacOS? Because the title suggests that you want to pickup the headers from the symlink and not the clang-installation, and I hope that is exactly the opposite of what you want to archive.

https://github.com/llvm/llvm-project/pull/68091


More information about the cfe-commits mailing list