[sanitizers] Pass CMAKE_C_FLAGS into TSan buildgo script
authorJoachim Protze <protze@itc.rwth-aachen.de>
Mon, 22 Feb 2021 17:46:28 +0000 (18:46 +0100)
committerJoachim Protze <protze@itc.rwth-aachen.de>
Mon, 22 Feb 2021 17:49:02 +0000 (18:49 +0100)
commited4230732adeb04a23fc25b7a5924e423ba5ac91
tree64843a3d6dd296821786393d80e004ddca20324e
parent4125afc35723b490556f7a38f7835f0914f70292
[sanitizers] Pass CMAKE_C_FLAGS into TSan buildgo script

When compiling with ccache, compiler commands get split into smaller steps
and clang's default -Wunused-command-line-argument complains about unused
include directory arguments. In combination -Werror, compilation aborts.

If CMAKE_C_FLAGS contains -Wno-unused-command-line-argument or
-Wno-error=unused-command-line-argument, the latter flag is passed into the
build script.

This is a re-commit. The previous version was reverted because of failing
tests.

Differential Revision: https://reviews.llvm.org/D96762
compiler-rt/lib/tsan/CMakeLists.txt
compiler-rt/lib/tsan/go/buildgo.sh