aboutsummaryrefslogtreecommitdiff
path: root/tools/driver
AgeCommit message (Collapse)Author
2026-10-19fix(driver): normalize MinGW JIT archive symbol definitions_ov4
Make absolute-zero pure virtual fallbacks local and compute runtime archive interfaces from normalized objects so ORC definitions match JITLink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18fix(driver): bind MinGW JIT runtime dependencies to host symbols_ov4
Resolve the known weak __cxa_pure_virtual reference through the host ABI instead of JITLink's unsupported absolute-zero fallback. Share the host's initialized stack guard and failure handler, and map write to _write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18fix(driver): include LLVM COFF helpers before Windows macros_ov4
Parse MinGWCOFF.h before windows.h so IMAGE_* macros do not replace LLVM COFF enum declarations or their uses in the normalization helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18fix(driver): normalize MinGW unwind COMDATs before JIT linking_ov4
Associate symbol-less MinGW unwind sections with their code before graph construction, including objects loaded from runtime archives. Handle suffixed unwind sections in personality stubs and SEH table registration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(driver): load the embedded C++ runtime into the JIT_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18feat(driver): add #LIB directive hiding library lines in runtime errors_ov4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18fix(driver): add COFF jump stubs for external object calls_ov4
Route external direct CALL/JMP PCRel32 references through nearby JITLink stubs so user objects can reach distant Windows CRT functions. Reuse the personality stub tables and preserve data references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17fix(driver): resolve JIT C symbols from msvcrt.dll first on Windows_ov4
Process-wide lookup can bind EXTERN functions such as puts to ucrtbase.dll, whose stdout buffer is separate from the host msvcrt used by OUTPUT, so redirected output can come out of order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17feat(driver): link INCLUDE_OBJ objects and check EXTERN symbols_ov4
Each EXTERN symbol must be defined by an INCLUDE_OBJ object file or by the embedded C library selected with INCLUDE_OBJ "__libc". Objects are linked natively, loaded by the embedded JIT and passed to lli. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17fix(driver): default native output to .exe on Windows_ov4
Without -o, cpsc saved test.out on every OS, which Windows cannot run directly. Use .exe under _WIN32 and keep .out elsewhere; update the manual and architecture notes accordingly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17refactor(runtime): write runtime diagnostics with fprintf(stderr)_ov4
Replace snprintf+write(2) with a single fprintf call on the platform's stderr: the C library's stderr / __stderrp, or __acrt_iob_func(2) on Windows, which the embedded runner binds to the host shim. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17feat(driver): compile multiple source files with INCLUDE visibility_ov4
Reject builds without an entry program and duplicate cross-file definitions. Preserve source order for each unit's own constants and import visible exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16refactor(jit): consolidate embedded object layer setup_ov4
Move ObjectLinkingLayer creation, COFF flags, and SEH plugin install into one file-local factory used before LLJIT owns the layer. Drop the repeated dyn_cast checks from the main flow. Linux verified: build, normal and large-frame runs, exception cases. Windows layer/plugin behavior still needs CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): use JITLink stubs for COFF personalities_ov4
Replace the IR personality forwarding layer with graph-local pointer jump stubs for the three GNU personality symbols in .xdata. Linux verified: build, nested THROW, cross-procedure unwind, CATCH with RETURN, uncaught exception. Windows execution still needs CI verification; the stub pass passed a local LLVM 23 syntax check only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): bind the MinGW runtime stack probe directly_ov4
Drop the hand-written chkstk assembly and bind the toolchain-provided ___chkstk_ms on MinGW x86-64 instead. Other targets register no probe. Linux verified: build, normal run, large-frame run, exception cases. Windows/MinGW execution still needs CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): remove redundant SEH preservation and validation_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): scope the __ImageBase alias to its own graph_ov4
Module and platform graphs each need their own base for 32-bit image-relative unwind addresses. A graph-local alias keeps the shared name from colliding at materialization time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): leave LLJIT platform graphs out of __ImageBase aliasing_ov4
Platform-support graphs carry __lljit.platform_support_instance and manage their own base; aliasing it there duplicates the symbol at materialization time and spoils the exit code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): guard personality access with hasPersonalityFn_ov4
getPersonalityFn on a function without the personality operand reads out of bounds. The newly created stub hit this in the reroute scan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): only alias __ImageBase when purely external_ov4
LLJIT platform-support graphs define their own __ImageBase; aliasing it again duplicates the symbol and corrupts materialization. Skip those. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): keep COFF unwind tables addressable from JIT memory_ov4
COFF unwind tables use 32-bit image-relative addresses. Alias the external __ImageBase to the lowest defined block once addresses are final, and route the personality through a JIT-local stub so both stay within range of the JIT tables. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): provide JIT-only stack probe without weak host reference_ov4
The weak ___chkstk_ms reference marked the host import weak on COFF and segfaulted the compiler itself. Provide a JIT-only probe under a unique name with the same page-touching behavior instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): resolve MinGW stack probe for embedded execution_ov4
Windows runner failed with missing ___chkstk_ms. Reference it weakly so platforms without it see null while MinGW exposes its host address. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): use large code model for embedded execution_ov4
Windows runner failed with PCRel32 out of range to __main because the host executable sits far from the JIT heap under the small code model. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): set COFF auto-claim flags on custom ObjectLinkingLayer_ov4
Windows execution awaits CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): register MinGW unwind tables through JITLink_ov4
Windows execution awaits CI verification. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16refactor(jit): migrate embedded execution to LLJIT and JITLink_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): register Windows x64 SEH function tables_ov4
Keep JIT sections contiguous and use RuntimeDyld's image base for SEH registration. Unregister tables before freeing memory and stop execution when registration fails. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(jit): always emit DWARF unwind frames on macOS_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16feat(driver)!: select LLVM IR output with -S_ov4
Save native executables by default and LLVM IR with -S, using source-adjacent .out and .ll names. Keep -r independent of output selection and update the manuals and three-platform nightly smoke checks. BREAKING CHANGE: plain compilation and -o now save native executables. Use -S to save textual LLVM IR. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16fix(driver): quote embedded linker script paths_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-16feat(driver): embed native compilation and link resources_ov4
Link LLVM, the Clang driver and LLD statically, and embed native link inputs so executable generation needs no installed development toolchain. Keep glibc dynamically linked on Linux. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-15fix(codegen): prevent NUM_TO_STR buffer overflow_ov4
Size REAL buffers for the full fixed-point double range and bound writes with snprintf. Register MinGW CRT aliases for embedded execution. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14update -h message_ov4
2026-10-14fix(driver)!: validate lli 23 before PATH execution_ov4
Check the selected lli only when PATH mode uses -r. Reject missing, mismatched or unreadable versions before compiling or writing IR, and limit version detection to five seconds. Keep unused tools unchecked. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14build(toolchain)!: require LLVM and Clang 23_ov4
Reject other compiler and LLVM major versions and remove GCC compiler fallbacks. Adapt string globals, block termination checks and the embedded target triple to LLVM 23 without changing pseudocode behavior. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat(compiler)!: add try-catch with C++ stack unwinding_ov4
Add TRY/CATCH/ENDTRY and anonymous THROW statements. Use LLVM exception handling and the C++ ABI to propagate exceptions across function calls, clean up catch state, and handle uncaught exceptions at the program boundary. Register exception runtime symbols for the statically linked embedded runner. Verify runtime checks, nested catches, returns, loops, and invalid syntax with smoke programs; exercise unwinding with MCJIT, lli, and native binaries. BREAKING CHANGE: Runtime check failures now throw anonymous exceptions and print only a generic message when uncaught. Native binaries require linking the C++ runtime. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat: point command-line help to the platform manual_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13fix: distinguish compiler errors and report compilation termination_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat: embed a statically linked LLVM execution engine_ov4
Add EMBEDDED mode to run generated modules in-process without lli or PATH lookup. Link LLVM and support archives plus the C++ runtime statically, while retaining the system C runtime on Linux. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat: require explicit execution mode and gate external running_ov4
Require PATH or NONE at configure time. Reject -r before writing output when lli is unavailable or execution is disabled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat: run generated IR with lli using -r_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-13feat: compile source files with configurable IR output_ov4
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-07-26refactor: batch 1 - correctness and error contract_ov4
- MID/RIGHT/LEFT integer args now coerced at call sites (RIGHT(s, n/2) no longer emits invalid IR); drop emitLeft's private conversion - FOR loop direction decided at run time via select on STEP sign; descending FOR works, STEP evaluated once per iteration - ArrayHandler: extract emitCheckedIndices/loadElement; index count is validated before emission, fixing a compiler-crash (vector OOB UB) on OUTPUT with too many indices - Error contract: Lexer/Parser/CodeGen track errors; all silent failure paths now print Error: diagnostics with line numbers; unterminated char literal no longer truncates the rest of the program; module is verified with verifyModule; driver exits non-zero on any error Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-01-29Added INPUT, OUTPUT and DECLAREov-4