aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/nightly-build.yml5
-rw-r--r--AGENTS/ARCH.md9
-rw-r--r--AGENTS/TESTING.md4
-rw-r--r--doc/build.md14
4 files changed, 17 insertions, 15 deletions
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml
index 049683c..147b491 100644
--- a/.github/workflows/nightly-build.yml
+++ b/.github/workflows/nightly-build.yml
@@ -41,7 +41,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential cmake clang-23 llvm-23-dev lld-23 \
- libclang-23-dev liblld-23-dev libpolly-23-dev python3 perl \
+ libclang-23-dev liblld-23-dev libpolly-23-dev perl \
zlib1g-dev libzstd-dev libncurses-dev libedit-dev pandoc
- name: Build the embedded release package
@@ -123,7 +123,7 @@ jobs:
run: |
test "$(uname -m)" = arm64
brew update
- brew install llvm@23 pandoc zlib zstd ncurses python perl
+ brew install llvm@23 pandoc zlib zstd ncurses perl
brew upgrade llvm@23
llvm_prefix=$(brew --prefix llvm@23)
test -x "$llvm_prefix/bin/clang++"
@@ -241,7 +241,6 @@ jobs:
mingw-w64-x86_64-clang-tools-extra
mingw-w64-x86_64-llvm
mingw-w64-x86_64-lld
- mingw-w64-x86_64-python
mingw-w64-x86_64-libffi
mingw-w64-x86_64-libxml2
mingw-w64-x86_64-libiconv
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md
index b146996..f6e5d30 100644
--- a/AGENTS/ARCH.md
+++ b/AGENTS/ARCH.md
@@ -36,7 +36,8 @@ uses C++ promotions, except that / always returns pseudocode REAL.
The compiler emits native executables by default and textual `.ll` IR with `-S`.
Initial configuration must explicitly select `CPSC_RUN_MODE=PATH`, `EMBEDDED` or
`NONE` (no default). All modes need LLVM/Clang/LLD 23 development libraries,
-Python 3.9+ and native C/C++ development files to build; NONE supports both outputs.
+Perl with core modules (including Compress::Zlib and JSON::PP) and native C/C++
+development files to build; NONE supports both outputs.
The following commands use Debian/Ubuntu's versioned compiler names:
```bash
@@ -180,7 +181,7 @@ does not replace an imported target's explicit `.dll.a` path.
`NativeCompiler` clones the module, sets the host triple/DataLayout and emits a PIC
object. Clang Driver constructs one platform linker job, which is dispatched to
embedded LLD without launching a process. `cmake/NativeCompiler.cmake` runs
-`tools/driver/prepare-native-runtime.py` at configure time to capture the build
+`tools/driver/prepare-native-runtime.pl` at configure time to capture the build
toolchain's link inputs and compress them into generated C++ data. Native compilation
extracts startup objects, runtime archives and system link interfaces to a temporary
directory; GNU linker scripts are relocated. macOS embeds SDK library stubs, not
@@ -276,7 +277,7 @@ source downloads remain available.
The Linux compiler and plugin jobs use Ubuntu 24.04 x86_64; the macOS compiler
job uses a macOS 15 arm64 runner, and Windows uses Windows Server 2025 x86_64.
All four check out the push SHA and run independently. All three
-compiler jobs use LLVM/Clang/LLD 23, Python (build-time), Release and EMBEDDED settings, Pandoc, and the
+compiler jobs use LLVM/Clang/LLD 23, Perl (build-time), Release and EMBEDDED settings, Pandoc, and the
existing `release` target. Linux obtains its toolchain from apt.llvm.org; macOS
uses Homebrew's LLVM 23 and builds matching static LLD with the helper above. Windows uses `msys2/setup-msys2@v2` with MINGW64,
MSYS2 LLVM/Clang packages, explicit native compiler and LLVM paths, and the
@@ -290,7 +291,7 @@ Node.js 22, `npm ci --ignore-scripts` and
`npm run package`, then checks VSIX contents. Each job retains its checked package
as a separate Actions artifact for one day, failing if the package is missing.
Compiler jobs enable
-BUILD_TESTING, install Perl for the tests and run all CTest cases with the push SHA as seed before
+BUILD_TESTING and run all CTest cases with the push SHA as seed before
their package smoke checks and uploads. Failed tests retain inputs and logs as
Actions artifacts for 14 days; test summaries appear even on failure. See TESTING.md.
The publish job downloads only the current run's `nightly-*` artifacts and checks
diff --git a/AGENTS/TESTING.md b/AGENTS/TESTING.md
index af66e93..585689a 100644
--- a/AGENTS/TESTING.md
+++ b/AGENTS/TESTING.md
@@ -1,6 +1,6 @@
# Compiler testing
-Compiler tests live in `tests/`; run instructions are in its README. `BUILD_TESTING` defaults to OFF and needs only Perl (core modules) when enabled. Python remains a compiler build dependency. CMake builds independent C++ reference executables with the same host ABI and registers one CTest entry per `case.json`, plus harness and generator checks.
+Compiler tests live in `tests/`; run instructions are in its README. `BUILD_TESTING` defaults to OFF and uses the compiler build's Perl interpreter with core modules when enabled. CMake builds independent C++ reference executables with the same host ABI and registers one CTest entry per `case.json`, plus harness and generator checks.
Each case directory has `program.cps` and `case.json`. Suite i adds `expected.txt`, optional `input.txt`, input files under `files/`, expected text-file contents under `expected-files/`, and independently written trace notes with human-review status. Suite ii adds `reference.cc` and `generate.pl`; the generator accepts seed and random count, emits the total record count followed by one ASCII record per line, and each program emits one result line per record. Suite iii stores an `errors` list of `{reason: regex, line: integer}` in its manifest. A cause and its line must appear on the same error diagnostic. EOF after a final newline is the following source line.
@@ -16,7 +16,7 @@ Suite i and ii cases may list `objects` as `{source, output}` pairs, for example
Optional manifest fields are `exit_code` for expected program status (default 0) and `timeout` for execution/reference seconds (default 30; file-intensive cases use 180). Compilation has a 120-second timeout. Do not make a known compiler defect pass by changing the expectation, adding an exemption or comparing only a permissive substring of program output.
-The Perl runner (`tests/run.pl`) accepts `--case`, `--cpsc`, `--run-mode`, `--perl`, `--reference`, `--seed`, `--count` and `--results`. CMake provides paths, including executable suffixes, and caches `CPSC_TEST_SEED` and `CPSC_TEST_COUNT`. The default seed is HEAD read at execution, not configure time. CI overrides it with the checked-out push SHA. Both native and enabled runner paths are tested independently; NONE skips only runner execution. Windows CI must configure a native `PERL_EXECUTABLE` (Strawberry Perl) because MSYS perl cannot read the native `D:/` drive paths CMake passes.
+The Perl runner (`tests/run.pl`) accepts `--case`, `--cpsc`, `--run-mode`, `--perl`, `--reference`, `--seed`, `--count` and `--results`. CMake provides paths, including executable suffixes, and caches `CPSC_TEST_SEED` and `CPSC_TEST_COUNT`. The default seed is HEAD read at execution, not configure time. CI overrides it with the checked-out push SHA. Both native and enabled runner paths are tested independently; NONE skips only runner execution. Windows builds and tests must configure a native `PERL_EXECUTABLE` (Strawberry Perl) because MSYS perl cannot read the native `D:/` drive paths CMake passes.
All commands run without a shell and retain their exact argv, working directory, input, status and output under the case result directory. Each execution path has its own files. Existing results for that case are replaced on re-run. Avoid concurrent runs of the same case into the same results directory. Tests compare CRLF-normalized bytes without stripping whitespace. A case may add `expected-stderr.txt` for runtime diagnostics, compared exactly; without it, successful compilation and ordinary programs require empty stderr.
diff --git a/doc/build.md b/doc/build.md
index 6f80236..c9d3b0a 100644
--- a/doc/build.md
+++ b/doc/build.md
@@ -30,7 +30,7 @@ version. CMake rebuilds its extraction directory when the package set changes.
If you use a different CMake build directory, download into its `deps/packages/`
instead. Removing the build directory also removes its downloaded dependencies.
-All three execution modes need LLVM, Clang and LLD 23 development libraries, Python 3.9 or newer, and the native C/C++ development libraries to build, including `NONE`. Users of an `EMBEDDED` executable do not need LLVM or `lli`.
+All three execution modes need LLVM, Clang and LLD 23 development libraries, Perl with its core modules (including Compress::Zlib and JSON::PP), and the native C/C++ development libraries to build, including `NONE`. Users of an `EMBEDDED` executable do not need LLVM or `lli`.
Compiler tests are optional (`-DBUILD_TESTING=ON`) and need only Perl with core modules (Digest::SHA, JSON::PP). See [the test instructions](../tests/README.md) for running CTest and replaying random inputs. CI enables the complete suite on every compiler platform.
@@ -48,7 +48,7 @@ Use a distribution repository that provides LLVM 23. Recommended build tools:
```bash
sudo apt-get update
-sudo apt-get install -y --no-install-recommends build-essential cmake clang-23 lld-23 python3
+sudo apt-get install -y --no-install-recommends build-essential cmake clang-23 lld-23 perl
```
Recommended LLVM and support-package downloads:
@@ -81,10 +81,11 @@ pacman -S --needed \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-make \
mingw-w64-x86_64-clang \
- mingw-w64-x86_64-clang-tools-extra \
- mingw-w64-x86_64-python
+ mingw-w64-x86_64-clang-tools-extra
```
+Install Strawberry Perl in Windows; the configuration example below uses `C:/Strawberry/perl/bin/perl.exe`. Use this native interpreter so it can read the Windows paths passed by CMake.
+
Confirm that both installed compilers report major version 23:
```bash
@@ -142,7 +143,7 @@ provides Clang 23. Install the build tools and LLVM SDK with Homebrew:
```bash
brew update
-brew install cmake python llvm@23
+brew install cmake perl llvm@23
brew upgrade llvm@23
```
@@ -196,6 +197,7 @@ MSYS2 MINGW64:
```bash
cmake -S . -B build -G "MinGW Makefiles" \
-DCPSC_RUN_MODE=EMBEDDED -DCMAKE_BUILD_TYPE=Release \
+ -DPERL_EXECUTABLE="C:/Strawberry/perl/bin/perl.exe" \
-DCMAKE_C_COMPILER="$(cygpath -m /mingw64/bin/clang.exe)" \
-DCMAKE_CXX_COMPILER="$(cygpath -m /mingw64/bin/clang++.exe)"
mingw32-make -C build -j4
@@ -232,7 +234,7 @@ required archive is a configure error. Linux also links the C++ runtime statical
and MinGW uses static linking. The tested Debian/LLVM 23 executable needs only
the system libc, libm and dynamic loader. Build for the intended OS and CPU.
-All execution modes embed the Clang driver, LLD and the startup objects, runtime archives and system-library link inputs needed for native output. Python prepares these compressed resources during configuration; it is not needed by users. Native output requires no installed compiler, linker or development SDK. On Linux, generated programs statically link the C++ runtime and dynamically link glibc and its system libraries, so they require a compatible system glibc. Do not use global `-static` on Linux. macOS embeds SDK library stubs and uses operating-system runtime libraries; Windows embeds MinGW link inputs and statically links non-system runtimes.
+All execution modes embed the Clang driver, LLD and the startup objects, runtime archives and system-library link inputs needed for native output. Perl prepares these compressed resources during configuration; it is not needed by users. Native output requires no installed compiler, linker or development SDK. On Linux, generated programs statically link the C++ runtime and dynamically link glibc and its system libraries, so they require a compatible system glibc. Do not use global `-static` on Linux. macOS embeds SDK library stubs and uses operating-system runtime libraries; Windows embeds MinGW link inputs and statically links non-system runtimes.
For `PATH` mode, add the extracted LLVM 23 `lli` directory to your shell's PATH
after configuration. Only `-r` checks the selected `lli --version`, with a