nanofil/bench/programs.nix
The benchmark's programs: for a C compiler cc (a path), a derivation per program with its executable at the top of $out. NANOFIL_OPT selects nanofil's mode when cc is nanofil-cc.
λpkgs, filcc
let
The amalgamation nix/sqlite.nix generates; sqlite3.c needs about 3 GB of Prolog stack in nanofil (NANOFIL_STACK_LIMIT).
import../nix/sqlite.nix inherit pkgs filcc;.amalgamation
"sqlite3"
λcc
export NANOFIL_STACK_LIMIT=4000000000
${cc} ${sqliteFlags} -I$src -c $src/sqlite3.c -o sqlite3.o &
${cc} ${sqliteFlags} -I$src -c $src/shell.c -o shell.o
wait $!
${cc} -o $out/sqlite3 shell.o sqlite3.o -lm
uses luaFlags sqliteFlags used by build
in
57inherit
progs
build NAME LABEL CC OPT [EXTRA]: program NAME built by CC with NANOFIL_OPT=OPT; EXTRA runs after the build, in the build directory.