mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 00:25:34 +08:00
- Pin GNU runtime packs to glibc 2.36 Zig targets and reject incompatible imports. - Provision verified Zig builds and exercise published artifacts on Debian Bookworm. Fixes #349 Co-authored-by: Cruel <383999+Cruel@users.noreply.github.com>
13 lines
962 B
JavaScript
13 lines
962 B
JavaScript
import { dirname } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { glibcRuntimeToolchain } from "../../runtime-pack-common/scripts/glibc-toolchain.mjs";
|
|
|
|
if (process.platform !== "linux" || process.arch !== "x64") {
|
|
process.stdout.write("@scriptc/runtime-linux-x64-gnu: skipped on this host\n");
|
|
process.exit(0);
|
|
}
|
|
process.env.SCRIPTC_RUNTIME_PACK_ROOT = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
const { minimumOs, ...toolchain } = glibcRuntimeToolchain("x64");
|
|
process.env.SCRIPTC_RUNTIME_PACK_CONFIG = JSON.stringify({ platform: "linux", runtimeDefines: ["_GNU_SOURCE"], threadArgs: ["-pthread"], target: { name: "linux-x64-gnu", llvm_triple: "x86_64-unknown-linux-gnu", architecture: "x64", object_format: "elf", minimum_os: minimumOs }, ...toolchain, compileFlags: ["-ffunction-sections", "-fdata-sections"], systemLibraries: [{ name: "m", predicate: true }] });
|
|
await import("../../runtime-pack-common/scripts/build.mjs");
|