[CMake] Avoid accidental C++ standard library dependency in sanitizers
authorPetr Hosek <phosek@google.com>
Sat, 31 Oct 2020 03:19:39 +0000 (20:19 -0700)
committerVitaly Buka <vitalybuka@google.com>
Sat, 31 Oct 2020 09:37:38 +0000 (02:37 -0700)
commit11efd002b1e6191d97abfec4e7b3d390d8589197
tree6bf02026dcfb5c79a0841204d165e53a052f7c3a
parent5c31b8b94fddc7c109672964c72670430fe30887
[CMake] Avoid accidental C++ standard library dependency in sanitizers

While sanitizers don't use C++ standard library, we could still end
up accidentally including or linking it just by the virtue of using
the C++ compiler. Pass -nostdinc++ and -nostdlib++ to avoid these
accidental dependencies.

Reviewed By: smeenai, vitalybuka

Differential Revision: https://reviews.llvm.org/D88922
compiler-rt/CMakeLists.txt
compiler-rt/lib/fuzzer/CMakeLists.txt
compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
compiler-rt/lib/xray/CMakeLists.txt