Feat/pgo v3 - #1138
Feat/pgo v3#1138henderkes wants to merge 92 commits into
Conversation
|
StaticPHP Test Bot Detected: Extensions: |
|
(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.) |
|
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.
|
…ith different pkg_root_path set
…fined behaviour sanitizer)
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 |
|
Oh, there's even an issue running the binaries despite no undefined sanitizer that I can't reproduce locally or in docker. Very weird. |
| name: opentelemetry | ||
| type: pie | ||
| repo: open-telemetry/ext-opentelemetry | ||
| build-root: ext |
There was a problem hiding this comment.
How about subdir? build-root is definitely ambiguous. Also, move all the previous metadata.source-root here.
There was a problem hiding this comment.
build-dir?
subdir doesn't say what that directory is used for
There was a problem hiding this comment.
Keep using source-root? build-dir sounds ambiguous too (out-of-source building). The name source-root also corresponds to our API getSourceRoot(). Although it still doesn't accurately describe our needs, it essentially redirects the source root.
There was a problem hiding this comment.
Two diffrremt things, we need both of them.
There was a problem hiding this comment.
Another approach is to completely redirect everything using source-root, eliminating the need to worry about subdirectories during in-tree extension builds:
- All artifacts are uniformly extracted to source/{name}
- During static compilation of PHP extensions, a symbolic link is created to the root directory or the specified source-root to php-src/ext/{name}
- Shared extensions remain unaffected
There was a problem hiding this comment.
After doing this, our previous source-root and the current source-root for PHP extensions are actually the same thing.
There was a problem hiding this comment.
Are you sure that doesn't have edge cases with extension configs resolving to absolute paths before? If it's working with all extensions I think that's a good idea.
The test still set the removed metadata.source-root key, so it asserted a subdir that getSourceRoot() never applied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011pkXY3NUGDanB7c1RGj8eA
What does this PR do?
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.