[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.

This patch passes the CMAKE_C_FLAGS into the build script. Configuring with
-DCMAKE_C_FLAGS=-Wno-unused-command-line-argument allows successful testing.

Differential Revision: https://reviews.llvm.org/D96762

GitOrigin-RevId: ac6c13bfc49f2d67a77144c839ecf49e48cb994c
2 files changed