@@ -7,6 +7,13 @@ const DEBUG = false;
77export const GRAPHITE = ! ! process . env . SK_GRAPHITE ;
88export const MACCATALYST = ! GRAPHITE ;
99const BUILD_WITH_PARAGRAPH = true ;
10+ // Re-enable mutable SkPath methods (addPath, moveTo, lineTo, etc.)
11+ // Skia is transitioning to immutable SkPath with SkPathBuilder
12+ // Set to false once we migrate to SkPathBuilder
13+ const ENABLE_SKPATH_EDIT_METHODS = true ;
14+ const PATH_EDIT_FLAG = ENABLE_SKPATH_EDIT_METHODS
15+ ? "-USK_HIDE_PATH_EDIT_METHODS"
16+ : "" ;
1017
1118export const SkiaSrc = path . join ( __dirname , "../../../externals/skia" ) ;
1219export const ProjectRoot = path . join ( __dirname , "../../.." ) ;
@@ -85,7 +92,6 @@ export const commonArgs = [
8592 //["skia_enable_ganesh", !GRAPHITE],
8693 [ "skia_enable_graphite" , GRAPHITE ] ,
8794 [ "skia_use_dawn" , GRAPHITE ] ,
88- [ "skia_use_cpp20" , GRAPHITE ] ,
8995] ;
9096
9197export type PlatformName = "apple" | "android" ;
@@ -120,7 +126,7 @@ const tvosTargets: { [key: string]: Target } = GRAPHITE
120126 args : [
121127 [
122128 "extra_cflags" ,
123- `["-target", "arm64-apple-tvos", "-mappletvos-version-min=${ appleMinTarget } "]` ,
129+ `["-fexceptions", "-frtti" ${ PATH_EDIT_FLAG ? `, " ${ PATH_EDIT_FLAG } "` : "" } , "- target", "arm64-apple-tvos", "-mappletvos-version-min=${ appleMinTarget } "]` ,
124130 ] ,
125131 [
126132 "extra_asmflags" ,
@@ -139,7 +145,7 @@ const tvosTargets: { [key: string]: Target } = GRAPHITE
139145 [ "ios_use_simulator" , true ] ,
140146 [
141147 "extra_cflags" ,
142- `["-target", "arm64-apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
148+ `["-fexceptions", "-frtti" ${ PATH_EDIT_FLAG ? `, " ${ PATH_EDIT_FLAG } "` : "" } , "- target", "arm64-apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
143149 ] ,
144150 [
145151 "extra_asmflags" ,
@@ -158,15 +164,15 @@ const tvosTargets: { [key: string]: Target } = GRAPHITE
158164 [ "ios_use_simulator" , true ] ,
159165 [
160166 "extra_cflags" ,
161- `["-target", "arm64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
167+ `["-fexceptions", "-frtti" ${ PATH_EDIT_FLAG ? `, " ${ PATH_EDIT_FLAG } "` : "" } , "- target", "x86_64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
162168 ] ,
163169 [
164170 "extra_asmflags" ,
165- `["-target", "arm64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
171+ `["-target", "x86_64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
166172 ] ,
167173 [
168174 "extra_ldflags" ,
169- `["-target", "arm64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
175+ `["-target", "x86_64 -apple-tvos-simulator", "-mappletvsimulator-version-min=${ appleSimulatorMinTarget } "]` ,
170176 ] ,
171177 ] ,
172178 } ,
@@ -184,7 +190,7 @@ const maccatalystTargets: { [key: string]: Target } = MACCATALYST
184190 [ "target_cpu" , `"arm64"` ] ,
185191 [
186192 "extra_cflags" ,
187- `["-target","arm64-apple-ios14.0-macabi",` +
193+ `["-fexceptions","-frtti" ${ PATH_EDIT_FLAG ? `," ${ PATH_EDIT_FLAG } "` : "" } ,"- target","arm64-apple-ios14.0-macabi",` +
188194 `"-isysroot","${ appleSdkRoot } ",` +
189195 `"-isystem","${ appleSdkRoot } /System/iOSSupport/usr/include",` +
190196 `"-iframework","${ appleSdkRoot } /System/iOSSupport/System/Library/Frameworks"]` ,
@@ -206,7 +212,7 @@ const maccatalystTargets: { [key: string]: Target } = MACCATALYST
206212 [ "target_cpu" , `"x64"` ] ,
207213 [
208214 "extra_cflags" ,
209- `["-target","x86_64-apple-ios14.0-macabi",` +
215+ `["-fexceptions","-frtti" ${ PATH_EDIT_FLAG ? `," ${ PATH_EDIT_FLAG } "` : "" } ,"- target","x86_64-apple-ios14.0-macabi",` +
210216 `"-isysroot","${ appleSdkRoot } ",` +
211217 `"-isystem","${ appleSdkRoot } /System/iOSSupport/usr/include",` +
212218 `"-iframework","${ appleSdkRoot } /System/iOSSupport/System/Library/Frameworks"]` ,
@@ -256,7 +262,7 @@ export const configurations = {
256262 [ "cxx" , '"clang++"' ] ,
257263 [
258264 "extra_cflags" ,
259- ' ["-DSKIA_C_DLL", "-DHAVE_SYSCALL_GETRANDOM", "-DXML_DEV_URANDOM"]' ,
265+ ` ["-DSKIA_C_DLL", "-DHAVE_SYSCALL_GETRANDOM", "-DXML_DEV_URANDOM"${ PATH_EDIT_FLAG ? `, " ${ PATH_EDIT_FLAG } "` : "" } ]` ,
260266 ] ,
261267 ...ParagraphArgsAndroid ,
262268 ] ,
@@ -276,32 +282,60 @@ export const configurations = {
276282 "arm64-iphoneos" : {
277283 cpu : "arm64" ,
278284 platform : "ios" ,
279- args : [ [ "ios_min_target" , `"${ appleMinTarget } "` ] ] ,
285+ args : [
286+ [ "ios_min_target" , `"${ appleMinTarget } "` ] ,
287+ [
288+ "extra_cflags" ,
289+ `["-fexceptions", "-frtti"${ PATH_EDIT_FLAG ? `, "${ PATH_EDIT_FLAG } "` : "" } ]` ,
290+ ] ,
291+ ] ,
280292 } ,
281293 "arm64-iphonesimulator" : {
282294 cpu : "arm64" ,
283295 platform : "ios" ,
284296 args : [
285297 [ "ios_min_target" , `"${ appleSimulatorMinTarget } "` ] ,
286298 [ "ios_use_simulator" , true ] ,
299+ [
300+ "extra_cflags" ,
301+ `["-fexceptions", "-frtti"${ PATH_EDIT_FLAG ? `, "${ PATH_EDIT_FLAG } "` : "" } ]` ,
302+ ] ,
287303 ] ,
288304 } ,
289305 "x64-iphonesimulator" : {
290306 cpu : "x64" ,
291307 platform : "ios" ,
292- args : [ [ "ios_min_target" , `"${ appleSimulatorMinTarget } "` ] ] ,
308+ args : [
309+ [ "ios_min_target" , `"${ appleSimulatorMinTarget } "` ] ,
310+ [
311+ "extra_cflags" ,
312+ `["-fexceptions", "-frtti"${ PATH_EDIT_FLAG ? `, "${ PATH_EDIT_FLAG } "` : "" } ]` ,
313+ ] ,
314+ ] ,
293315 } ,
294316 ...tvosTargets ,
295317 ...maccatalystTargets ,
296318 "arm64-macosx" : {
297319 platformGroup : "macosx" ,
298320 cpu : "arm64" ,
299321 platform : "mac" ,
322+ args : [
323+ [
324+ "extra_cflags" ,
325+ `["-fexceptions", "-frtti"${ PATH_EDIT_FLAG ? `, "${ PATH_EDIT_FLAG } "` : "" } ]` ,
326+ ] ,
327+ ] ,
300328 } ,
301329 "x64-macosx" : {
302330 platformGroup : "macosx" ,
303331 cpu : "x64" ,
304332 platform : "mac" ,
333+ args : [
334+ [
335+ "extra_cflags" ,
336+ `["-fexceptions", "-frtti"${ PATH_EDIT_FLAG ? `, "${ PATH_EDIT_FLAG } "` : "" } ]` ,
337+ ] ,
338+ ] ,
305339 } ,
306340 } ,
307341 args : [
0 commit comments