[all-commits] [llvm/llvm-project] a32a2b: [clang][driver] Add <executable>/../include/c++/v1...
Liviu Ionescu via All-commits
all-commits at lists.llvm.org
Mon Nov 20 08:15:18 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a32a2b2ceb6b4c1bbcbcb39363c8dee44daf86ab
https://github.com/llvm/llvm-project/commit/a32a2b2ceb6b4c1bbcbcb39363c8dee44daf86ab
Author: Liviu Ionescu <ilg at livius.net>
Date: 2023-11-20 (Mon, 20 Nov 2023)
Changed paths:
M clang/lib/Driver/ToolChains/Darwin.cpp
M clang/test/Driver/darwin-header-search-libcxx.cpp
Log Message:
-----------
[clang][driver] Add <executable>/../include/c++/v1 to include path on Darwin (#70817)
On macOS, when clang is invoked via a symlink, since the InstalledDir is
where the link is located, the C++ headers are not identified and the
default system headers from the SDK are used.
This can be undesirable if a toolchain is created by symlinking clang
into a directory and placing libc++ headers in that directory with the
intent of those headers overriding the SDK headers. This change solves
that problem by also looking for libc++ headers in the toolchain-relative
location of the executable symlink, if any.
More information about the All-commits
mailing list