[libcxx-commits] [PATCH] D131441: [libc++] Diagnose when header search paths are set up incorrectly
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 8 14:16:36 PDT 2022
ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131441
Files:
libcxx/include/cctype
libcxx/include/cerrno
libcxx/include/cfenv
libcxx/include/cfloat
libcxx/include/cinttypes
libcxx/include/climits
libcxx/include/clocale
libcxx/include/cmath
libcxx/include/csetjmp
libcxx/include/cstddef
libcxx/include/cstdint
libcxx/include/cstdio
libcxx/include/cstdlib
libcxx/include/cstring
libcxx/include/cuchar
libcxx/include/cwchar
libcxx/include/cwctype
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131441.450946.patch
Type: text/x-patch
Size: 12757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220808/09de4ecd/attachment-0001.bin>
More information about the libcxx-commits
mailing list