mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
only run micro patches when building it
This commit is contained in:
@@ -143,7 +143,7 @@ abstract class BuilderBase
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function proveExts(array $static_extensions, array $shared_extensions = [], bool $skip_check_deps = false, bool $skip_extract = false): void
|
||||
public function proveExts(array $static_extensions, array $shared_extensions = [], bool $skip_check_deps = false, bool $skip_extract = false, int $build_target = BUILD_TARGET_NONE): void
|
||||
{
|
||||
// judge ext
|
||||
foreach ($static_extensions as $ext) {
|
||||
@@ -171,7 +171,9 @@ abstract class BuilderBase
|
||||
SourceManager::initSource(exts: [...$static_extensions, ...$shared_extensions]);
|
||||
$this->emitPatchPoint('after-exts-extract');
|
||||
// patch micro
|
||||
SourcePatcher::patchMicro();
|
||||
if (($build_target & BUILD_TARGET_MICRO) === BUILD_TARGET_MICRO) {
|
||||
SourcePatcher::patchMicro();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ([...$static_extensions, ...$shared_extensions] as $extension) {
|
||||
|
||||
@@ -180,7 +180,7 @@ class BuildPHPCommand extends BuildCommand
|
||||
// compile libraries
|
||||
$builder->proveLibs($libraries);
|
||||
// check extensions
|
||||
$builder->proveExts($static_extensions, $shared_extensions);
|
||||
$builder->proveExts($static_extensions, $shared_extensions, build_target: $rule);
|
||||
// validate libs and extensions
|
||||
$builder->validateLibsAndExts();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user