mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +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.
11 lines
429 B
JavaScript
11 lines
429 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)),
|
|
};
|
|
}
|