gfxstream: codegen: don't require clang-format

When auto-generating at build time, this causes
problems for AOSP:

https://android.googlesource.com/platform/build/+/main/Changes.md#PATH_Tools

Don't require via environment variable.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Gurchetan Singh
2024-09-12 11:47:20 -07:00
committed by Marge Bot
parent 58269cf5c5
commit ae2b79462c
@@ -187,9 +187,11 @@ class Module(object):
file.write(modified_content)
clang_format_command = shutil.which('clang-format')
assert (clang_format_command is not None)
def formatFile(filename: Path):
if "GFXSTREAM_NO_CLANG_FMT" in os.environ:
return
assert (clang_format_command is not None)
assert (subprocess.call([clang_format_command, "-i",
"--style=file", str(filename.resolve())]) == 0)