Skip to content

Feat/pgo v3#1138

Open
henderkes wants to merge 20 commits into
v3from
feat/pgo-v3
Open

Feat/pgo v3#1138
henderkes wants to merge 20 commits into
v3from
feat/pgo-v3

Conversation

@henderkes
Copy link
Copy Markdown
Collaborator

What does this PR do?

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php or *.json, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:sort-config
  • If it's an extension or dependency update, please ensure the following:
    • Add your test combination to src/globals/test-extensions.php.
    • If adding new or fixing bugs, add commit message containing extension test or test extensions to trigger full test suite.

@henderkes henderkes marked this pull request as ready for review May 11, 2026 14:49
@henderkes henderkes requested a review from crazywhalecc May 11, 2026 14:49
@crazywhalecc crazywhalecc added the need-test This PR has not been tested yet, cannot merge now label May 12, 2026
@github-actions
Copy link
Copy Markdown

StaticPHP Test Bot

Detected: Extensions: opcache, pgsql, spx | Libraries: bzip2, fastlz, icu, jbig, krb5, liblz4, ncurses, openssl, postgresql, qdbm, unixodbc | Targets: curl, php
Active labels: none
Config: Linux x86_64 + Windows x86_64 + macOS arm64 | PHP 8.5 NTS

@henderkes
Copy link
Copy Markdown
Collaborator Author

(I tested with static-php/packages v3 branch, php 8.5 zig on rpm. Tests with Alpine and gcc are still to finish in a few hours when ci runs.)

@henderkes
Copy link
Copy Markdown
Collaborator Author

Wair, why is curl a target like php and not a package/library? We don't compile the exe right?

@crazywhalecc
Copy link
Copy Markdown
Owner

Wair, why is curl a target like php and not a package/library? We don't compile the exe right?

We could compile curl.exe, which shows that StaticPHP is not only suitable for building static PHP, but also for other projects. Just like we already support building pkg-config and re2c. Making them targets simply makes reasonable.

target is superset of library.

@henderkes
Copy link
Copy Markdown
Collaborator Author

Wair, why is curl a target like php and not a package/library? We don't compile the exe right?

We could compile curl.exe, which shows that StaticPHP is not only suitable for building static PHP, but also for other projects. Just like we already support building pkg-config and re2c. Making them targets simply makes reasonable.

target is superset of library.

Okay, added curl.exe on Windows too. Also figured out the root cause of the BUILD_CC patch minilua crash (zigs undefined behaviour sanitizer tripping up, if you run CC="clang -fsanitize=undefined" it will also fail) which coincidentally also fixed a possible edge case bug. BUILD_CC is also used for gen_ir so by using a different vm type it could have theoretically clashed.

@henderkes
Copy link
Copy Markdown
Collaborator Author

Oh, there's even an issue running the binaries despite no undefined sanitizer that I can't reproduce locally or in docker. Very weird.

@crazywhalecc
Copy link
Copy Markdown
Owner

Oh, there's even an issue running the binaries despite no undefined sanitizer that I can't reproduce locally or in docker. Very weird.

Yup. I have no idea except using native compiler instead.

@henderkes
Copy link
Copy Markdown
Collaborator Author

Hmm, the iconv fail on windows should be unrelated to my changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-test This PR has not been tested yet, cannot merge now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants