Skip to content

Commit 367044f

Browse files
authored
chore: fix build script
1 parent 949147c commit 367044f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/build_skia.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ if (Deno.build.os === "windows") {
8282
'"-DSK_HAS_HEIF_LIBRARY",' +
8383
'"-DSK_SHAPER_HARFBUZZ_AVAILABLE"';
8484

85-
if (Deno.build.os === "darwin" && Deno.build.arch === "aarch64") {
85+
const targetArm64 = Deno.env.get("TARGET_ARM64") === "1";
86+
if ((Deno.build.os === "darwin" && Deno.build.arch === "aarch64") || targetArm64) {
8687
BUILD_ARGS["target_cpu"] = `"arm64"`;
8788
BUILD_ARGS["target_os"] = `"mac"`;
8889
BUILD_ARGS["extra_cflags_cc"] += ', "--target=arm64-apple-macos"';
@@ -99,13 +100,13 @@ Deno.chdir(new URL("../skia", import.meta.url));
99100

100101
const $ = (cmd: string | URL, ...args: string[]) => {
101102
console.log(`%c$ ${cmd.toString()} ${args.join(" ")}`, "color: #888");
102-
Deno.spawnSync(cmd, {
103+
new Deno.Command(cmd, {
103104
args,
104105
cwd: new URL("../skia", import.meta.url),
105106
stdin: "null",
106107
stdout: "inherit",
107108
stderr: "inherit",
108-
});
109+
}).outputSync();
109110
};
110111

111112
if (!Deno.args.includes("skip-sync-deps")) {

0 commit comments

Comments
 (0)