From 85b88c5f51c7a13a49a37c79a4e92556d8ba4ee3 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 4 Feb 2026 17:11:08 +0300 Subject: [PATCH] Adding xcode toolchain lookup. (#8342) --- code_style.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code_style.sh b/code_style.sh index 2db5b1348..5f87464a6 100755 --- a/code_style.sh +++ b/code_style.sh @@ -53,6 +53,15 @@ for name in ${clang_format_exe_names[@]}; do break fi done + +# Xcode toolchain lookup +if [ -z "${clang_format_exe}" ]; then + xcrun=$(command -v xcrun) + if [ "$?" -eq 0 ]; then + clang_format_exe=$("$xcrun" --find clang-format) + fi +fi + if [ -z "${clang_format_exe}" ]; then echo "error: clang-format not found"; exit 1;