[all-commits] [llvm/llvm-project] 201fde: libclang: Pass Clang install directory to driver v...
pcc via All-commits
all-commits at lists.llvm.org
Wed Mar 22 15:31:18 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 201fdef40dd6ec193d18d39638454a3c972f1fec
https://github.com/llvm/llvm-project/commit/201fdef40dd6ec193d18d39638454a3c972f1fec
Author: Peter Collingbourne <peter at pcc.me.uk>
Date: 2023-03-22 (Wed, 22 Mar 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang-c/Index.h
M clang/test/Index/record-completion-invocation.c
M clang/test/Index/record-parsing-invocation.c
M clang/tools/libclang/CIndex.cpp
Log Message:
-----------
libclang: Pass Clang install directory to driver via argv[0].
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
More information about the All-commits
mailing list