TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

3.3 KiB

Third-party source policy

The generated thirdparty/ directory is intentionally ignored by Git. Every third-party source dependency must instead be declared by a script under tools/ with all of the following information:

  • an immutable upstream version or commit;
  • the canonical download URL;
  • a SHA-256 checksum for every downloaded archive or individual source file;
  • an explicit list of files copied into the build tree, or an explicitly documented complete release tree for source-port candidates;
  • the upstream license file.

Run the common fetch entry point before compiling:

./tools/fetch-thirdparty.sh

make invokes this command automatically. Each dependency has a dedicated fetch-*.sh script, while fetch-thirdparty.sh is only the common entry point. A matching local version marker makes repeated invocations offline and effectively free. Third-party source must not be committed directly.

Run the upstream integration probes separately:

make thirdparty-smoke

This target builds a deliberately small hosted Toybox and audits its undefined ABI. It is not installed into the TypePHP-OS disk image by this probe.

OpenLibm

Only the architecture/compatibility headers and C sources required by TypePHP-OS's current x86_64 double-precision math ABI are installed. The selection keeps unused implementations out of the freestanding payload.

LLVM compiler-rt builtins

The source selection provides the x86-64 128-bit integer shift, multiply, divide, and remainder helpers. It is compiled into build/libcompiler-rt-builtins.a and linked after every kernel, bootstrap C, and TypePHP Nano userspace object set. The builtins.elf smoke command forces signed and unsigned 128-bit division so the archive is tested as a real linker dependency instead of merely being compiled.

Toybox

The hosted probe enables only cat, date, echo, pwd, and uname; it does not enable Toybox's shell or process-management commands. The undefined host ABI is written to build/thirdparty-smoke/toybox-undefined-symbols.txt. ioctl is a system-call API used by Toybox's shared C support library, not a Toybox command. None of those five applet source files calls it directly, but the common terminal/daemon helpers still leave an ioctl reference in the hosted binary. TypePHP-OS now exposes the Linux-numbered syscall and implements TIOCGWINSZ for its fixed console. Toybox still needs a freestanding build and ABI audit before it can replace any existing command.