From 9428cf648bdea98c856fd36873dec6d613a46c1b Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Fri, 31 May 2024 17:19:15 +0000 Subject: [PATCH] [clang_format] Update clang path Bug: 336843583 Change-Id: I1ace05b40420894797e68f6beaaea2360a297ba6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5586436 Reviewed-by: Joanna Wang Commit-Queue: Josip Sokcevic --- clang_format.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clang_format.py b/clang_format.py index b72b978d0..c62baf87b 100755 --- a/clang_format.py +++ b/clang_format.py @@ -49,10 +49,12 @@ def FindClangFormatToolInChromiumTree(): arch = detect_host_arch.HostArch() if sys.platform == 'darwin' and arch == 'arm64': new_bin_path += '_arm64' - new_tool_path = os.path.join(new_bin_path, 'format', - 'clang-format' + gclient_paths.GetExeSuffix()) + old_new_tool_path = os.path.join( + new_bin_path, 'format', 'clang-format' + gclient_paths.GetExeSuffix()) + latest_new_tool_path = os.path.join( + f'{new_bin_path}-format', 'clang-format' + gclient_paths.GetExeSuffix()) - possible_paths = [new_tool_path, old_tool_path] + possible_paths = [latest_new_tool_path, old_new_tool_path, old_tool_path] for path in possible_paths: if os.path.exists(path): return path