File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 11import { exit } from "process" ;
2+ import path from "path" ;
23
34import type { Platform , PlatformName } from "./skia-configuration" ;
45import {
6+ applyGraphiteSkiaPatches ,
57 commonArgs ,
68 configurations ,
79 copyHeaders ,
@@ -279,6 +281,22 @@ const buildXCFrameworks = () => {
279281 process . chdir ( SkiaSrc ) ;
280282 $ ( "PATH=../depot_tools/:$PATH python3 tools/git-sync-deps" ) ;
281283 console . log ( "gclient sync done" ) ;
284+ if ( GRAPHITE ) {
285+ console . log ( "Applying Graphite patches..." ) ;
286+ $ ( `git reset --hard HEAD` ) ;
287+
288+ // Apply arm64e simulator patch
289+ const arm64ePatchFile = path . join ( __dirname , "dawn-arm64e-simulator.patch" ) ;
290+ $ ( `cd ${ SkiaSrc } && git apply ${ arm64ePatchFile } ` ) ;
291+
292+ // Fix Dawn ShaderModuleMTL.mm uint32 typo if it exists
293+ const shaderModuleFile = `${ SkiaSrc } /third_party/externals/dawn/src/dawn/native/metal/ShaderModuleMTL.mm` ;
294+ $ (
295+ `sed -i '' 's/uint32(bindingInfo\\.binding)/uint32_t(bindingInfo.binding)/g' ${ shaderModuleFile } `
296+ ) ;
297+
298+ console . log ( "Patches applied successfully" ) ;
299+ }
282300 $ ( `rm -rf ${ PackageRoot } /libs` ) ;
283301
284302 // Build specified platforms and targets
Original file line number Diff line number Diff line change 1+ From e34f6eaae468d0499b544815f67a73c6f75e9d56 Mon Sep 17 00:00:00 2001
2+ From: William Candillon <
[email protected] >
3+ Date: Sat, 18 Oct 2025 18:45:06 +0200
4+ Subject: [PATCH] Remove unavailable platform on simulator
5+
6+ ---
7+ gn/skia/BUILD.gn | 8 ++++++--
8+ 1 file changed, 6 insertions(+), 2 deletions(-)
9+
10+ diff --git a/gn/skia/BUILD.gn b/gn/skia/BUILD.gn
11+ index 8e42db771b..30048a1d43 100644
12+ --- a/gn/skia/BUILD.gn
13+ +++ b/gn/skia/BUILD.gn
14+ @@ -199,9 +199,13 @@ config("default") {
15+ _arch_flags = [
16+ "-arch",
17+ "arm64",
18+ - "-arch",
19+ - "arm64e",
20+ ]
21+ + if (!ios_use_simulator) {
22+ + _arch_flags += [
23+ + "-arch",
24+ + "arm64e",
25+ + ]
26+ + }
27+ } else if (current_cpu == "x86") {
28+ _arch_flags = [
29+ "-arch",
30+ - -
31+ 2.42.0
32+
You can’t perform that action at this time.
0 commit comments