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