← board

Toolchain CLI / user tooling (install, config, discovery, doctor, selfcheck)

Shape: installer is a script; everything else is a pxx flag

Config resolution (the foundation — get this right first)

The compiler already anchors lib/rtl, lib/pcl, builtin/ to ExeDir (<root>/compiler/ -> ../lib/...). Generalize to an explicit, inspectable order:

  1. CLI flags (-Fu, -I) — highest.
  2. Env (PXX_HOME, optional PXX_LIBPATH) — for non-default installs.
  3. A config file (pxx.cfg, FPC-fpc.cfg-analog) next to the binary or in ~/.config/pxx/ — optional.
  4. ExeDir-relative defaults — the zero-config install path (works today).

Lower tiers are fallbacks; nothing required for a normal unpack-and-run install.

pxx flags to add

Native-target detect + alias

uname -m -> the matching bin/pxx-<arch> -> symlink/alias pxx. Lives in setup.sh (pre-PATH); pxx --where confirms which binary is active afterward. (Overlaps feature-release-packaging setup.sh — implement once there, surface the result here via --where.)

Non-goals

Sequencing

  1. Config resolution (tiers above) + pxx --where — foundation, makes every "can't find units" issue self-diagnosable. Highest value, do first.
  2. pxx --list-targets / --version — trivial, ride on existing data.
  3. pxx --list-libraries + pxx --doctor — discoverability/diagnostics; grow the library registry as IDF/Synapse/etc. mature.
  4. pxx --selfcheck — with feature-release-packaging (needs the manifest).