nanofil/nix/swipl.nix
SWI-Prolog 9.2.9 built entirely by nanofil, with filnix's port of it (ports.nix's swi-prolog: patches/swi-prolog-9.2.9-filc.patch) and the port's packages: the core, the packages that need no further library (chr, clib, clpqr, http, nlp, pengines, pldoc, plunit, RDF, semweb, sgml, table, utf8proc, zlib, ...) and pcre, yaml and ssl. GMP, zlib, OpenSSL, PCRE2, libyaml and libxcrypt are staging filnix's ports.
CMake configures with filcc; ninja then compiles every C file with nanofil-cc (CMAKE_C_COMPILER_LAUNCHER), mkvmi and defatom included, and every object must come from nanofil. The build runs the nanofil-built swipl: it compiles SWI's boot file and its library to QLF, bootstraps CHR and builds the library indexes, and home/ (boot.prc's contents, every .qlf and INDEX.pl) must equal filcc's byte for byte, apart from the padded PID of a QLF file's temporary name: both builds run in the same directory, in their own derivations. Then the deterministic workload (workloads/swipl.pl) must print what filcc's prints, plainly and under FUGC_SCRIBBLE and FUGC_VERIFY, and SWI's own test suite (ctest) must give each test the result it gives filcc's build. Once per configuration (plain and -O), each in its own derivation.
Configure in /build/swipl/build, the same path in every derivation, so that the QLF files, which record source paths, can be compared.
results: each ctest test and its outcome, in name order. The C stack is 32 MB: analyseVariables2 (pl-comp.c) recurses 10,000 levels into a cyclic term before it checks for a cycle, and its frame is 216 bytes from clang, 512 from nanofil -O and 864 plain, past 8 MB (Fil-C stops the overflow safely; test_db's cyclic_head and test_gc trap). Only http:proxy, if it failed, runs once more, alone, and that result counts: its "unused" port is one it found free and released, which a test running beside it can take (filcc's build fails it so too, now and then). Any other failure stands.
A QLF file's bytes depend on which library INDEX.pl files exist when it is compiled (autoloading reads them, which changes the order its functors are made), and ninja does not order the two: compile the QLF files again, one at a time, once everything else is built.