Use clang as C compiler
When setting up the clang build, use clang as the C compiler and the C++
compiler. This matters for C libraries where we might want to set up
fuzzing. Having the C portions compile with GCC prevents compiling with
libfuzzer flags.
Change-Id: I113693bc139f4ebb58107e3df26ee82cc460f460
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index cd28e21..9d79b79 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -1061,6 +1061,7 @@
# Run clang-tidy only if the project has a configuration
if os.path.isfile(".clang-tidy"):
+ os.environ["CC"] = "clang"
os.environ["CXX"] = "clang++"
with TemporaryDirectory(prefix="build", dir=".") as build_dir:
check_call_cmd("meson", "setup", build_dir)