mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 00:25:34 +08:00
* feat(compiler): add native LLVM object emission - ship the pinned macOS arm64 LLVM helper and platform package - add assembly/object CLI outputs, caching, diagnostics, and runtime ABI checks - validate helper artifacts through CI, packaging, docs, and differential coverage * fix(compiler): harden native LLVM emission * fix(compiler): harden LLVM helper packaging * fix(compiler): stabilize LLVM helper package size * fix(compiler): harden native helper validation * fix(compiler): harden LLVM helper verification * fix(compiler): harden native object emission
12 lines
435 B
JavaScript
12 lines
435 B
JavaScript
const MACHO_LINKER_GLOBALS = new Set(["__mh_execute_header"]);
|
|
|
|
/** Executables may expose Mach-O's linker-defined image-header symbol even
|
|
* when their exported-symbol list contains only the process entry point. */
|
|
export function validateLlvmHelperExports(symbols) {
|
|
return {
|
|
hasMain: symbols.includes("_main"),
|
|
unexpected: symbols.filter((symbol) =>
|
|
symbol !== "_main" && !MACHO_LINKER_GLOBALS.has(symbol)),
|
|
};
|
|
}
|