diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 10:04:54 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 10:04:54 +0000 |
| commit | 066a378ca09ccc5d8074a942cf4bf1b9d4f40729 (patch) | |
| tree | 9a6ff973e6ef07f6fec425413868805d6aed4b03 /AGENTS | |
| parent | 0305500e31eda6fe6da84f88748fc20843aebbce (diff) | |
fix(driver): default native output to .exe on Windows
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>
Diffstat (limited to 'AGENTS')
| -rw-r--r-- | AGENTS/ARCH.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md index 5ddddc1..f85364b 100644 --- a/AGENTS/ARCH.md +++ b/AGENTS/ARCH.md @@ -43,7 +43,7 @@ The following commands use Debian/Ubuntu's versioned compiler names: cmake -S . -B build -DCPSC_RUN_MODE=EMBEDDED \ -DCMAKE_C_COMPILER=clang-23 -DCMAKE_CXX_COMPILER=clang++-23 cmake --build build -build/cpsc prog.cps # save prog.out beside the source +build/cpsc prog.cps # save prog.out (prog.exe on Windows) beside the source build/cpsc prog.cps -S # save prog.ll beside the source build/cpsc prog.cps -r # run without saving output build/cpsc prog.cps -r -S -o prog.ll # save IR, then run it @@ -104,7 +104,8 @@ Driver behavior (`tools/driver/main.cc`): verification. Diagnostics stay on stderr; source errors preserve existing output. Native linking uses a staged file beside the output and renames it on success. - `-S` selects textual IR; otherwise output is a native executable. Without `-o`, - replace the entry source extension with `.ll` or `.out` beside the source on every OS. + replace the entry source extension with `.ll`, or with `.exe` on Windows / `.out` elsewhere + for an executable, beside the source. `-o` paths are used literally and never select the format. `-r` alone saves nothing; either `-S` or `-o` requests saving before execution. - Lexer, Parser and CodeGen track error flags (`hadError()`); any error, including |
