mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
Various driver features, such as the sysroot path detection for Android targets, rely on being able to find the Clang install directory (look for callers of `getDriver().getInstalledDir()`). However, the install directory isn't currently being plumbed through to the driver, which is conventionally done via the argv[0] passed to the Driver constructor. It looks like D14695 attempted to fix this by adding another API that allows specifying the argv[0]. However, rather than requiring every user of libclang to switch to this API for correct behavior, let's have the other existing APIs work by default, by using the existing logic in libclang for finding the install directory. Differential Revision: https://reviews.llvm.org/D146497