Skip to content

Commit

Permalink
💄
Browse files Browse the repository at this point in the history
  • Loading branch information
wcandillon committed Jan 6, 2024
1 parent e21affa commit 9198645
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 11 additions & 1 deletion scripts/build-skia-ios-framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ console.log("");
console.log("Prerequisites met. Starting build.");
console.log("");

console.log("Building fat binary for iphone simulator");
configurations.ios.outputNames.forEach((out) => {
console.log(`Building fat binary for simulator for file ${out}`);
executeCmdSync(
`lipo -create package/libs/ios/x64/${out} package/libs/ios/arm64-iphonesimulator/${out} -output package/libs/ios/${
out.split(".")[0]
}.a`
);
});

console.log("");
console.log("Building xcframeworks...");

Expand All @@ -41,7 +51,7 @@ configurations.ios.outputNames.forEach((out) => {
executeCmdSync(`rm -rf ./package/libs/ios/${libName}.xcframework`);
executeCmdSync(
"xcodebuild -create-xcframework " +
`-library ./package/libs/ios/x64/${libName}.a ` +
`-library ./package/libs/ios/${libName}.a ` +
`-library ./package/libs/ios/arm64-iphoneos/${libName}.a ` +
` -output ./package/libs/ios/${libName}.xcframework `
);
Expand Down
9 changes: 0 additions & 9 deletions scripts/build-skia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,6 @@ try {
executeCmdSync("PATH=../depot_tools/:$PATH python3 tools/git-sync-deps");
console.log("gclient sync done");

// Generate libgrapheme headers
if (SelectedPlatform === "ios") {
if (!fs.existsSync("./third_party/externals/libgrapheme/gen/case.o")) {
console.log("Generating libgrapheme headers...");
const libgraphemeDir = `./third_party/externals/libgrapheme`;
executeCmdSync(`cd ${libgraphemeDir} && ./configure && make clean && make`);
}
}

try {
// Configure the platform
if (!configurePlatform(SelectedPlatform, SelectedTarget)) {
Expand Down
7 changes: 7 additions & 0 deletions scripts/skia-configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@ export const configurations: Configuration = {
["ios_min_target", '"13.0"'],
],
},
"arm64-iphonesimulator": {
cpu: "arm64",
args: [
["ios_min_target", '"13.0"'],
["ios_use_simulator", true],
],
},
x64: {
cpu: "x64",
args: [
Expand Down

0 comments on commit 9198645

Please sign in to comment.