build: add apple silicon support (#24545)
* chore: add patches to prevent installation of non-arm pip packages * chore: add patches for apple-silicon * build: add apple silicon build * ci: add testing of new arm binary * chore: remove / update for upstreamed patches * Skip content tracing on macos on arm * build: ensure that spec native modules are rebuilt for arm64 on apple-silicon * chore: fix patches * chore: fix broken patch * chore: fix arm64 DCHECK * build: add MAS arm64 build * build: disable arm2 tests * chore: update patches * build: actually build MAS version of apple silicon app Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
parent
6f53457a17
commit
f146a164af
17 changed files with 767 additions and 70 deletions
|
@ -97,3 +97,8 @@ feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
|
|||
use_electron_resources_in_icon_reader_service.patch
|
||||
fix_patch_out_profile_refs_in_accessibility_ui.patch
|
||||
fix_accessibility_label_id_mismatch.patch
|
||||
remove_some_deps_that_do_not_work_on_arm64.patch
|
||||
chore_add_allocator_patches_for_apple_silicon.patch
|
||||
chore_disable_failing_blink_font_dcheck_on_big_sur.patch
|
||||
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
|
||||
fix_compare_page_size_to_ulong_not_int.patch
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Mon, 6 Jul 2020 20:49:19 -0700
|
||||
Subject: chore: add allocator patches for apple silicon
|
||||
|
||||
Once these are available upstream we can remove this patch.
|
||||
|
||||
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
|
||||
index e24439cee6c81afc74bfcb557cbdab6785a32794..f84128e76f380a86b74d354787c741c2217b6b69 100644
|
||||
--- a/base/mac/mac_util.h
|
||||
+++ b/base/mac/mac_util.h
|
||||
@@ -132,6 +132,12 @@ DEFINE_IS_OS_FUNCS(15, TEST_DEPLOYMENT_TARGET)
|
||||
DEFINE_IS_OS_FUNCS(15, IGNORE_DEPLOYMENT_TARGET)
|
||||
#endif
|
||||
|
||||
+#ifdef MAC_OS_X_VERSION_10_16
|
||||
+DEFINE_IS_OS_FUNCS(16, TEST_DEPLOYMENT_TARGET)
|
||||
+#else
|
||||
+DEFINE_IS_OS_FUNCS(16, IGNORE_DEPLOYMENT_TARGET)
|
||||
+#endif
|
||||
+
|
||||
#undef IGNORE_DEPLOYMENT_TARGET
|
||||
#undef TEST_DEPLOYMENT_TARGET
|
||||
#undef DEFINE_IS_OS_FUNCS_CR_MIN_REQUIRED
|
|
@ -0,0 +1,26 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Mon, 6 Jul 2020 20:52:09 -0700
|
||||
Subject: chore: disable failing blink font DCHECK on Big Sur
|
||||
|
||||
Once these are available upstream we can remove this patch.
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
|
||||
index d6abddab51bc95768467b3d84a55e07dec262f26..0678c9d30e162beb9fec6f98ae82e31b042723cf 100644
|
||||
--- a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
|
||||
+++ b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
|
||||
@@ -59,10 +59,10 @@ bool VariableAxisChangeEffective(SkTypeface* typeface,
|
||||
return false;
|
||||
|
||||
SkFontParameters::Variation::Axis axes_parameters[num_axes];
|
||||
- int returned_axes =
|
||||
- typeface->getVariationDesignParameters(axes_parameters, num_axes);
|
||||
- DCHECK_EQ(num_axes, returned_axes);
|
||||
- DCHECK_GE(num_axes, 0);
|
||||
+ // int returned_axes =
|
||||
+ // typeface->getVariationDesignParameters(axes_parameters, num_axes);
|
||||
+ // DCHECK_EQ(num_axes, returned_axes);
|
||||
+ // DCHECK_GE(num_axes, 0);
|
||||
|
||||
float clamped_new_value = new_value;
|
||||
for (auto& axis_parameters : axes_parameters) {
|
|
@ -0,0 +1,21 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@github.com>
|
||||
Date: Thu, 9 Jul 2020 11:16:30 -0400
|
||||
Subject: fix: check IsSecureEventInputEnabled in constructor before setting
|
||||
SetPasswordInputEnabled to true
|
||||
|
||||
It appears that macOS 12 has IsSecureEventInputEnabled set to true initially.
|
||||
|
||||
diff --git a/ui/base/cocoa/secure_password_input.mm b/ui/base/cocoa/secure_password_input.mm
|
||||
index c9d003216ec51407d80b2c3ed0a77e747d203069..f10829d7fe369d2419bb1f0828d6d1ec7c8f57e1 100644
|
||||
--- a/ui/base/cocoa/secure_password_input.mm
|
||||
+++ b/ui/base/cocoa/secure_password_input.mm
|
||||
@@ -41,7 +41,7 @@ void SetPasswordInputEnabled(bool enabled) {
|
||||
namespace ui {
|
||||
|
||||
ScopedPasswordInputEnabler::ScopedPasswordInputEnabler() {
|
||||
- if (!g_password_input_counter) {
|
||||
+ if (!g_password_input_counter && !IsSecureEventInputEnabled()) {
|
||||
SetPasswordInputEnabled(true);
|
||||
}
|
||||
++g_password_input_counter;
|
|
@ -0,0 +1,20 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Tue, 14 Jul 2020 14:51:31 -0700
|
||||
Subject: fix: compare page size to ulong not int
|
||||
|
||||
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2298340
|
||||
|
||||
diff --git a/base/process/process_metrics_mac.cc b/base/process/process_metrics_mac.cc
|
||||
index 6d05c82369f792f5f396dfc4f2c61f49b6585390..8f80975763e8a2e04dbe5864d7d4eaf7460cd119 100644
|
||||
--- a/base/process/process_metrics_mac.cc
|
||||
+++ b/base/process/process_metrics_mac.cc
|
||||
@@ -298,7 +298,7 @@ bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo) {
|
||||
|
||||
#if defined(ARCH_CPU_ARM64)
|
||||
// PAGE_SIZE is vm_page_size on arm, which isn't constexpr.
|
||||
- DCHECK_EQ(PAGE_SIZE % 1024, 0) << "Invalid page size";
|
||||
+ DCHECK_EQ(PAGE_SIZE % 1024, static_cast<uint64_t>(0)) << "Invalid page size";
|
||||
#else
|
||||
static_assert(PAGE_SIZE % 1024 == 0, "Invalid page size");
|
||||
#endif
|
|
@ -0,0 +1,168 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Mon, 6 Jul 2020 16:59:17 -0700
|
||||
Subject: remove some deps that do not work on arm64
|
||||
|
||||
Once these deps have been fixed upstream we can remove this patch.
|
||||
|
||||
diff --git a/.vpython b/.vpython
|
||||
index 0a28e76064296edea609eb52e57555689c23c0a3..bea6a9b7ee4b64dcc44b6f345a83e28d1d22649c 100644
|
||||
--- a/.vpython
|
||||
+++ b/.vpython
|
||||
@@ -53,10 +53,10 @@ wheel: <
|
||||
#
|
||||
# This version must be compatible with the version range specified by
|
||||
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
- version: "version:5.2.2"
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
+# version: "version:5.2.2"
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# third_party/catapult
|
||||
@@ -67,37 +67,37 @@ wheel: <
|
||||
# This version must also be compatible with the "numpy" version, as "cv2"
|
||||
# depends on "numpy". In this case, OpenCV@2.4.13.2 has been built against
|
||||
# numpy@1.11.3.
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/opencv_python/${vpython_platform}"
|
||||
- version: "version:2.4.13.2"
|
||||
- match_tag: <
|
||||
- platform: "win32"
|
||||
- >
|
||||
- match_tag: <
|
||||
- platform: "win_amd64"
|
||||
- >
|
||||
- match_tag: <
|
||||
- abi: "cp27mu"
|
||||
- platform: "manylinux1_i686"
|
||||
- >
|
||||
- match_tag: <
|
||||
- abi: "cp27mu"
|
||||
- platform: "manylinux1_x86_64"
|
||||
- >
|
||||
- match_tag: <
|
||||
- platform: "macosx_10_6_intel"
|
||||
- >
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/opencv_python/${vpython_platform}"
|
||||
+# version: "version:2.4.13.2"
|
||||
+# match_tag: <
|
||||
+# platform: "win32"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# platform: "win_amd64"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# abi: "cp27mu"
|
||||
+# platform: "manylinux1_i686"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# abi: "cp27mu"
|
||||
+# platform: "manylinux1_x86_64"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# platform: "macosx_10_6_intel"
|
||||
+# >
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# third_party/catapult
|
||||
#
|
||||
# This version must be compatible with the version range specified by
|
||||
# //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/numpy/${vpython_platform}"
|
||||
- version: "version:1.11.3"
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/numpy/${vpython_platform}"
|
||||
+# version: "version:1.11.3"
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# third_party/catapult
|
||||
@@ -132,10 +132,10 @@ wheel: <
|
||||
|
||||
# Used by:
|
||||
# testing/buildbot/generate_buildbot_json_coveragetest.py
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/coverage/${vpython_platform}"
|
||||
- version: "version:4.3.4"
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/coverage/${vpython_platform}"
|
||||
+# version: "version:4.3.4"
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# build/android/pylib/local/emulator/avd.py
|
||||
@@ -166,27 +166,27 @@ wheel: <
|
||||
|
||||
# Used by:
|
||||
# tools/perf/flakiness_cli
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/pandas/${vpython_platform}"
|
||||
- version: "version:0.23.4"
|
||||
- match_tag: <
|
||||
- platform: "win32"
|
||||
- >
|
||||
- match_tag: <
|
||||
- platform: "win_amd64"
|
||||
- >
|
||||
- match_tag: <
|
||||
- abi: "cp27mu"
|
||||
- platform: "manylinux1_i686"
|
||||
- >
|
||||
- match_tag: <
|
||||
- abi: "cp27mu"
|
||||
- platform: "manylinux1_x86_64"
|
||||
- >
|
||||
- match_tag: <
|
||||
- platform: "macosx_10_6_intel"
|
||||
- >
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/pandas/${vpython_platform}"
|
||||
+# version: "version:0.23.4"
|
||||
+# match_tag: <
|
||||
+# platform: "win32"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# platform: "win_amd64"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# abi: "cp27mu"
|
||||
+# platform: "manylinux1_i686"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# abi: "cp27mu"
|
||||
+# platform: "manylinux1_x86_64"
|
||||
+# >
|
||||
+# match_tag: <
|
||||
+# platform: "macosx_10_6_intel"
|
||||
+# >
|
||||
+#>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pytz-py2_py3"
|
||||
version: "version:2018.4"
|
||||
@@ -268,10 +268,10 @@ wheel <
|
||||
name: "infra/python/wheels/funcsigs-py2_py3"
|
||||
version: "version:1.0.2"
|
||||
>
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
- version: "version:5.2.2"
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
+# version: "version:5.2.2"
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# tools/infra
|
Loading…
Add table
Add a link
Reference in a new issue