mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-22 05:59:31 +08:00
- Enforce oxlint and oxfmt for owned JavaScript and TypeScript with independent CI checks. - Preserve compiler import boundaries and protected fixtures while cleaning up lint findings. - Standardize source formatting and validate import, fixture, and embedded-source protections.
32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
import { dirname } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
if (
|
|
process.env.SCRIPTC_BUILD_CROSS !== "1" &&
|
|
(process.platform !== "linux" || process.arch !== "arm64")
|
|
) {
|
|
process.stdout.write("@scriptc/runtime-linux-arm64-musl: skipped on this host\n");
|
|
process.exit(0);
|
|
}
|
|
process.env.SCRIPTC_RUNTIME_PACK_ROOT = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
process.env.SCRIPTC_RUNTIME_PACK_CONFIG = JSON.stringify({
|
|
platform: "linux",
|
|
runtimeDefines: ["_GNU_SOURCE", "SCR_MUSL"],
|
|
threadArgs: ["-pthread"],
|
|
extraRuntimeSources: ["scr_musl.c"],
|
|
compiler: "zig",
|
|
compilerArgs: ["cc"],
|
|
archiver: "zig",
|
|
archiverArgs: ["ar"],
|
|
target: {
|
|
name: "linux-arm64-musl",
|
|
llvm_triple: "aarch64-unknown-linux-musl",
|
|
architecture: "arm64",
|
|
object_format: "elf",
|
|
minimum_os: "musl 1.2",
|
|
},
|
|
targetArgs: ["-target", "aarch64-linux-musl"],
|
|
compileFlags: ["-ffunction-sections", "-fdata-sections"],
|
|
systemLibraries: [{ name: "m", predicate: true }],
|
|
});
|
|
await import("../../runtime-pack-common/scripts/build.mjs");
|