[all-commits] [llvm/llvm-project] 8cedff: [libc++] Diagnose when header search paths are set...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Wed Aug 17 11:05:47 PDT 2022
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2022-08-17 (Wed, 17 Aug 2022)
[libc++] Diagnose when header search paths are set up incorrectly
An issue I often see in codebases compiled for unusual platforms is
that header search paths are specified manually and are subtly wrong.
For example, people will manually add `-isystem <some-toolchain>/usr/include`,
which ends up messing up the layering of header search paths required by
libc++ (because the C Standard Library now appears *before* libc++ in
the search paths). Without this patch, this will end up causing
compilation errors that are pretty inscrutable. This patch aims to
improve the user experience by diagnosing this issue explicitly.
In all cases I can think of, I would expect that a compilation error
occur if these header search paths are not layered properly. This
should only provide an explicit diagnostic instead of failing due
to seemingly unrelated compilation errors.
Differential Revision: https://reviews.llvm.org/D131441
More information about the All-commits