Repository navigation
V3c/pgo split 1 - #1287
Merged
Merged
V3c/pgo split 1#1287
Conversation
The buildroot include rewrite compared a realpath'd -isystem argument against BUILD_ROOT_PATH, i.e. the buildroot root instead of its include/ directory, so it never matched and every -isystem was passed through unchanged. Compare against BUILD_INCLUDE_PATH instead, map -mtune=generic to zig's "baseline" spelling, and drop GCC-only warning flags (-Wlogical-op, -Wduplicated-cond, -Warray-bounds=*, ...) that clang/zig does not know, so they no longer produce -Wunknown-warning-option noise. Port of #1138 (4f76942, 8f557aa).
The only guard was --max-time 3600, so an unreachable host or a mirror that stops sending data blocks the build for up to an hour. Abort when no connection is established within 15s, and when throughput stays below 1 byte/s for 30s. Applies to both executeCurl() and executeCurlDownload(). Port of #1138 (7d3e1f8).
cgo caches the evaluated include list across builds (FRANKENPHP_VERSION and friends are resolved from generated headers), so a rebuild could keep reporting and compiling against the values from the previous build even after the headers were regenerated. Clear the go build cache before xcaddy runs. Port of #1138 (a88e426).
Expose --with-sysconfdir and forward it to PHP's configure as --sysconfdir=..., so packagers can point PHP at a location such as /etc/php-zts. The option is wired into the Unix configure path only; Windows ignores it. Document the option in the bilingual CLI reference and in the craft.yml build-options example. Port of #1138 (8f557aa).
On Windows the default pwsh shell does not stop a `run: |` block when a native command exits non-zero. `spc doctor --auto-fix` exiting 69 (e.g. its vswhere auto-fix download failed) was therefore swallowed and the build kept running until it failed the environment check, hiding the real cause. Split doctor and build into separate steps so a doctor failure fails the job immediately on every shell.
|
StaticPHP Test Bot Detected: Extensions: none | Libraries: |
… before extraction
…ing PHP version switch
henderkes
approved these changes
Nov 10, 2026
henderkes
left a comment
Collaborator
There was a problem hiding this comment.
other than that minor thing all good
| * @throws ExecutionException When an extracted tree cannot be removed completely | ||
| */ | ||
| public static function removeExtensionSources(string $source_path): int | ||
| public static function removeExtensionSources(string $source_path, array $extra_source_dirs = []): int |
Collaborator
There was a problem hiding this comment.
I think this logic will bite with opentelemetry's source root. It'll delete the parent directory and then the child which will crash.
…temException for directory removal errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR mainly handles modifications in 4 pgo-v3 branches and can be merged independently into the v3 branch:
fix(php): add --with-sysconfdir build option—src/Package/Target/php.php,src/Package/Target/php/unix.php. Feeds--sysconfdir=to configure.fix(frankenphp): go clean -cache before xcaddy—src/Package/Target/php/frankenphp.php. Avoids stale cgo include evaluation (FRANKENPHP_VERSIONetc.) on rebuilds.fix(zig-cc): honour BUILD_INCLUDE_PATH—src/globals/scripts/zig-cc.sh. Rewrite-isystem <buildroot>/include→-IusingBUILD_INCLUDE_PATH; map-mtune=generic→baseline; drop GCC-only warnings. Onv3the rewrite compares againstBUILD_ROOT_PATH, so it never fires (dead code).fix(download): curl connect/speed timeouts—src/StaticPHP/Runtime/Shell/DefaultShell.php(2 call sites). Add--connect-timeout 15 --speed-limit 1 --speed-time 30;v3only has--max-time 3600, so a dead mirror hangs the build.Checklist before merging
*.phpor*.yml, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:lint-config