Files
scriptc/scripts/llvm-package-symbols.mjs
Chris Tate 401338f437 feat(compiler): add native LLVM object emission (#242)
* 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
2026-08-27 10:30:40 -05:00

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)),
};
}