From eba981b4f515010f8f6e9602c563d2074d8bd915 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 03:41:04 +0000 Subject: refactor(driver): move PATH-mode lli runner into PathRunner PathRunner.cc holds the lli lookup, LLVM 23 version check and lli execution, and is built only with CPSC_RUN_MODE=PATH like EmbeddedRunner.cc is for EMBEDDED. Co-Authored-By: Claude Opus 5.5 --- AGENTS/ARCH/DRIVER.md | 5 +++-- AGENTS/ARCH/LAYOUT.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'AGENTS') diff --git a/AGENTS/ARCH/DRIVER.md b/AGENTS/ARCH/DRIVER.md index 1b37d01..ef739b2 100644 --- a/AGENTS/ARCH/DRIVER.md +++ b/AGENTS/ARCH/DRIVER.md @@ -47,8 +47,9 @@ style is in [CONVENTIONS/SYMBOLS_AND_ERRORS.md](../CONVENTIONS/SYMBOLS_AND_ERROR than grepping stderr. - Successful compilation overwrites the output, but paths aliasing any input source (including symlinks/hard links) are rejected. -- In PATH mode, `-r` executes PATH's `lli` using LLVM Support process APIs, with - inherited stdin/stdout/stderr and no shell. Missing lli is rejected before +- In PATH mode (`tools/driver/PathRunner.cc`, built only in that mode), `-r` + executes PATH's `lli` using LLVM Support process APIs, with inherited + stdin/stdout/stderr and no shell. Missing lli is rejected before compiling or writing output. The selected `lli --version` must identify LLVM 23 and succeed within five seconds; other or unrecognized versions fail before source compilation. Without `-r`, no external tools are checked; clang/clang++ diff --git a/AGENTS/ARCH/LAYOUT.md b/AGENTS/ARCH/LAYOUT.md index 4abe414..6c70d3b 100644 --- a/AGENTS/ARCH/LAYOUT.md +++ b/AGENTS/ARCH/LAYOUT.md @@ -28,6 +28,7 @@ | `CMakeLists.txt` | 3 static libs (CPSLexer, CPSParser, CPSCodeGen) + `cpsc`. **New .cc files must be added to the source lists here** | | `tools/driver/NativeCompiler.cc`, `cmake/NativeCompiler.cmake` | Host object generation, embedded Clang/LLD linking and compressed link resources | | `tools/driver/EmbeddedRunner.cc`, `tools/driver/MinGWJIT.cc`, `cmake/EmbeddedLLVM.cmake` | EMBEDDED-only LLJIT/JITLink runner and MinGW COFF/SEH support; static support-library selection for all modes | +| `tools/driver/PathRunner.cc` | PATH-only `-r` runner: lli lookup, LLVM 23 version check and lli execution | | `cmake/LocalDependencies.cmake`, `cmake/*Packages.cmake` | Local package extraction and platform relocation | | `cmake/DependencyPaths.cmake`, `cmake/FindDependency.cmake` | Shared local paths and local-first/system-fallback lookup | | `cmake/BuildTools.cmake`, `cmake/LLVMDependencies.cmake` | Compiler/build tool selection and LLVM dependency discovery | -- cgit v1.3.1-4-g156e