فهرست منبع

[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 <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Josip Sokcevic 1 سال پیش
والد
کامیت
9428cf648b
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      clang_format.py

+ 5 - 3
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