[clang] [clang][driver] Use platform specific calls to get the executable absolute path (PR #68091)
Liviu Ionescu via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 3 13:22:30 PDT 2023
ilg-ul wrote:
> resolving this to the actual clang binary would indeed seem like the right thing to do.
Great! The new simplified patch does exactly this.
> it makes me wonder if someone actually is relying on the current behaviour
To rephrase your question, you ask if someone is using a configuration with a folder where various custom libraries are and bin folder with a link to the actual clang, and expects for clang to pick the custom libraries instead of the distributed ones? I obviously can't tell, but I would say that the chances are slim.
And, in case someone wants such a configuration, the current patch, if `-no-canonical-prefixes` is used, reverts to the previous behaviour, when the symlink is not followed.
> whatever the consequences are of using a different install dir is kinda of irrelevant here
Well, given how much time I spent trying to understand some weird errors caused by this, I would not call them irrelevant :-(
> there should be a well defined logic for how that's calculated
Right, but I would say that the current logic based on the folder where the clang executable is located worked fine till now, and I see no reasons to change it, just that till now there were no use cases with symlinks from different folders (a configuration specific to the npm/xpm ecosystem).
https://github.com/llvm/llvm-project/pull/68091
More information about the cfe-commits
mailing list