HomePhabricator

Add -Wpoison-system-directories warning

Description

Add -Wpoison-system-directories warning

When using clang as a cross-compiler, we should not use system
headers to do the compilation.
This CL adds support of a new warning flag -Wpoison-system-directories which
emits warnings if --sysroot is set and headers from common host system location
are used.
By default the warning is disabled.

The intention of the warning is to catch bad includes which are usually
generated by third party build system not targeting cross-compilation.
Such cases happen in Chrome OS when someone imports a new package or upgrade
one to a newer version from upstream.

Patch by: denik (Denis Nikitin)

Details

Committed
manojguptaSep 12 2019, 3:36 PM
Parents
rL371784: [NFC] Sort source files in Utility/CMakeLists.txt
Branches
Unknown
Tags
Unknown