fix(ci): parallelize the clang-cl Windows lane with /MP - #67
Open
luthermonson wants to merge 1 commit into
Open
luthermonson wants to merge 1 commit into
luthermonson wants to merge 1 commit into
Conversation
The build-windows-clang job was cancelled at ~2h during "Build php8embed (clang-cl toolset)" — the PHP compile itself. Root cause: PHP's win32 build (config.w32) only enables multi-process compilation (/MP) inside `if (VS_TOOLSET)`. This lane patches PHP_TOOLSET="clang", so VS_TOOLSET is false and the /MP block is skipped. PHP's batched inference rule still hands many .c files to one clang-cl invocation, but without /MP that invocation compiles them single-process. clang-cl is slower per TU than MSVC, so the serial batch overran the 2h ephemerd VM job_timeout. The MSVC lane fits precisely because it gets PHP's default `/MP auto` for free. Fix: extend the existing config.w32 patch step to add `/MP` to CFLAGS for the non-VS toolset (clang-cl honors /MP; this lane pins LLVM 22.x), mirroring the VS behaviour and keeping PHP's own debug-build carve-out. Hard-fails if the anchor drifts, like the other patches in that step.
|
ePHPm Preview — deployed (health check pending)
Preview updates automatically on each push to this PR. |
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.
Problem
build-windows-clang("Windows (x86_64, clang-cl TAILCALL, experimental)") times out. A real run attached its runner fine, got through every setup step, and was cancelled at exactly ~2h during Build php8embed (clang-cl toolset) — the PHP compile itself. The MSVC lane (build-windows) fits under 2h and publishes its assets; only the clang-cl lane overruns.Root cause
PHP's win32 build enables multi-process compilation (
/MP) only insideif (VS_TOOLSET)inwin32/build/config.w32:This lane patches
PHP_TOOLSET = "clang", soVS_TOOLSETis false and that entire block is skipped. PHP's batched inference rule (confutils.js, the non-PHP_MP_DISABLEDbranch) still hands many.cfiles to a single clang-cl invocation, but with no/MPthat invocation compiles them single-process. clang-cl is slower per TU than MSVC, so the serial batch overruns the 2h ephemerd VMjob_timeout. The MSVC lane fits precisely because it gets PHP's default/MP autofor free.Fix
Extend the existing "Clone and patch php-src" step to add
/MPtoCFLAGSfor the non-VS toolset, right aftertoolset_setup_common_cflags()(whereCFLAGSis defined andVS_TOOLSETis already set):/MP(this lane pins LLVM 22.x;/MPsupport landed long before)./MP auto(all cores) and keeps PHP's own debug-build carve-out.toolset_setup_common_cflags();anchor drifts, matching the other two patches in that step./MPreaches the compile because spc's--no-stripembed path readsCFLAGS=from the generated Makefile and re-passes it tonmake; PHP's configure writes theADD_FLAGresult into that line.Only comments and the patch step change. No behavior change to the MSVC lane.
Validation
Dispatched a test build from this branch with
release_tag_suffix=-clangparso it uploads tov8.5.7-clangparand cannot touch productionv8.5.7assets. Not merging until that run confirms the compile fits under 119 min.