[PATCH] D52524: Add -Wpoison-system-directories warning

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 30 09:55:46 PDT 2021


aaron.ballman added a comment.

In D52524#2721073 <https://reviews.llvm.org/D52524#2721073>, @sbc100 wrote:

> Would it make sense to have this apply to system library paths too?   i.e. `-L/usr/local/lib`.
>
> We have a bespoke mechanism in emscripten right now that is a bit more flexible but I'd love to simple replace it with `-Wpoison-system-directories`.
>
> The name "system directories" seems to imply that it should apply to both include and library directories.  It also looks like the gcc version applies to both `Warn for -I and -L options using system directories if cross compiling` (from https://github.com/Metrological/buildroot/blob/master/package/gcc/4.8.4/910-gcc-poison-system-directories.patch).

FWIW, I think it would make sense to support library paths as well.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52524/new/

https://reviews.llvm.org/D52524



More information about the cfe-commits mailing list