Add dependency map generator and related docs

This commit is contained in:
crazywhalecc
2024-08-21 11:08:57 +08:00
committed by Jerry Ma
parent 077da6f6a4
commit 73654e5984
13 changed files with 398 additions and 19 deletions

View File

@@ -14,14 +14,6 @@ Some extensions or libraries that the extension depends on will have some option
For example, the gd library optionally supports libwebp, freetype, etc.
If you only use `bin/spc build gd --build-cli` they will not be included (static-php-cli defaults to the minimum dependency principle).
You can use `--with-libs=` to add these libraries when compiling.
When the dependent libraries of this compilation include them, gd will automatically use them to enable these features.
(For example: `bin/spc build gd --with-libs=libwebp,freetype --build-cli`)
Alternatively you can use `--with-suggested-exts` and `--with-suggested-libs` to enable all optional dependencies of these extensions and libraries.
(For example: `bin/spc build gd --with-suggested-libs --build-cli`)
If you don't know whether an extension has optional features,
you can check the [spc configuration file](https://github.com/crazywhalecc/static-php-cli/tree/main/config)
or use the command `bin/spc dev:extensions` (library dependency is `lib-suggests`, extension dependency is `ext-suggests`).
For more information about optional libraries, see [Extensions, Library Dependency Map](./deps-map).
For optional libraries, you can also select an extension from the [Command Generator](./cli-generator) and then select optional libraries.
:::