================
@@ -331,6 +340,56 @@ static void SetInstallDir(SmallVectorImpl<const char *> 
&argv,
   // path being a symlink.
   SmallString<128> InstalledPath(argv[0]);
 
+#if defined(__linux__)
----------------
ilg-ul wrote:

> Can we use `getMainExecutable()` instead?

Good point! 

> So is the problem here that SetInstallDir is called after the above (having 
> constructed TheDriver). Resulting in InstalledDir being changed into being 
> relative to the symlink?

When I first encountered this problem I tried to run a debug session to 
understand how things work, but got confused and in the end I patched 
`SetInstallDir` and for my needs it was ok, but since `getMainExecutable()` 
already does the job I'll reconsider and try to understand where the problem 
comes from.

https://github.com/llvm/llvm-project/pull/68091
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to