Files
scriptc/tests/test262/compile-worker.ts
Chris Tate 3f66c8e20b Make LLVM the sole production backend
- Remove C emission, debugging options, and automatic backend fallback.
- Complete LLVM lowering and native bootstrap coverage across supported targets.
- Link executables and libraries with precompiled C runtime packs, including iOS and Android.
2026-09-29 20:54:09 -05:00

24 lines
864 B
TypeScript

// A separate process lets the runner bound compiler hangs and crashes as well
// as program execution. It imports the current compiler source, like Vitest.
import { readFileSync, writeFileSync } from "node:fs";
import { compile } from "../../packages/compiler/src/index.js";
async function main(): Promise<void> {
const request = JSON.parse(readFileSync(process.argv[2]!, "utf8"));
const result = await compile(request.entry, {
outDir: request.workDir,
outPath: request.binary,
dynamic: false,
sanitize: request.sanitize,
...(request.backend === "default" ? {} : { backend: request.backend }),
});
writeFileSync(request.result, JSON.stringify(result.ok
? { ok: true, backend: result.backend }
: { ok: false, diagnostics: result.diagnostics }));
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});