electron/patches/chromium/hack_to_allow_gclient_sync_...

26 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Rose <jeremya@chromium.org>
Date: Tue, 15 Jun 2021 15:16:12 -0700
Subject: hack to allow gclient sync with host_os=mac on linux in CI
This is a hack to work around the fact that we run `gclient sync` for
our macOS CI on Linux.
If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index bdcfeb4c9cc2615227c10f4420dc44ec912dcacc..b0aadecf50b2562ae50b322a2823075499cb18e8 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -311,6 +311,8 @@ def GetDefaultHostOs():
'win32': 'win',
}
default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform)
+ if "host_os=mac" in os.environ.get('GCLIENT_EXTRA_ARGS', ''):
+ default_host_os = 'mac'
if default_host_os == 'mac' and platform.machine() == 'arm64':
default_host_os = 'mac-arm64'
return default_host_os