-
-
Notifications
You must be signed in to change notification settings - Fork 321
Add zig toolchain support & shared build improvement #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
288 commits
Select commit
Hold shift + click to select a range
176e562
hahaha, musl 2.17 is a little far away
henderkes 03a33d8
fix frankenphp build
henderkes 2ff78e5
cs fix, where did that come from?
henderkes 9a3ce77
complete test suite
henderkes 2b4eb71
what the frick is going on with my phpstorm
henderkes 7edd8e6
test glibc of course
henderkes 8c70499
can build shared extensions on ubuntu 24.04 now
henderkes 6dec25b
space
henderkes d945420
Update test-extensions.php
henderkes 55d7857
pgsql x86_64 fix?
henderkes cc4ec4b
add back debug
henderkes 5a7fd8c
we shouldn't need that, need to figure out the cause
henderkes 797aaf1
remove libdir
henderkes d2dea83
don't check for musl toolkit when running zig, add -static to ncurses
henderkes e6bec8e
fix lib extra cflags
henderkes 383045d
cs fix
henderkes e162a0e
libaom uses different PIC check
henderkes 69e1acd
really stupid patch
henderkes ff95b46
really stupid patch for swoole
henderkes e92f043
really stupid patch for swoole
henderkes 43dc04b
building shared libphp.so on musl is really pointless and should be a…
henderkes 464c2dc
cs fix
henderkes 96babd0
crazy test
henderkes f528153
strip libphp.so and frankenphp
henderkes b6240f1
clean files before compiling because it may try to link the wrong one
henderkes 4c8a173
build_lib_path is better
henderkes aff9ff2
test fix?
henderkes efb1ff5
test fix 2?
henderkes aa51652
why isn't this triggered?
henderkes 61274cb
use extra COMPILER_EXTRA env variable to make sure it's actually pass…
henderkes 4a493f3
don't set rpath because on musl it'll fall over with static binaries
henderkes de3cb2f
no ""
henderkes 9e9474a
extra patch for swoole for CFLAGS too
henderkes 02f2837
adjust craft command for zig
henderkes a7bf1e9
we need to patch swoole early enough
henderkes 19ddddf
self:: instead of SourcePatcher::
henderkes d588e6e
just strip out the error and return the output instead of executing a…
henderkes d6b0912
run glibc test with shared extensions against 2.28 this time
henderkes a44d906
fix existing check for Zig::fetch
henderkes 1d29ac2
Revert "just strip out the error and return the output instead of exe…
henderkes 6ed62aa
use CC=cc to install xcaddy
henderkes bd25de1
okay this drove me crazy...
henderkes 2564da2
Reapply "just strip out the error and return the output instead of ex…
henderkes dbdf10c
support for dynamic linking of musl libc
henderkes 78666ff
support for frankenphp linked dynamically too
henderkes 3940f03
fix tests
henderkes 320c21d
-static, not static
henderkes 1839f13
thanks, autocomplete, for the useless flag
henderkes 2ebdc45
<
henderkes c43a100
fix
henderkes ad8322b
add zig to libc/static target parsing
henderkes 7b33ee7
make sure that $TARGET splits for -dynamic, otherwise it resolves to …
henderkes df0d5fd
merge fix
henderkes 5370af4
don't zig the tests yet
henderkes 0a33fba
zig toolchain stuff
henderkes b7e8587
cs fixes
henderkes 9c7e217
formatting
henderkes ba7f994
simplify zig script
henderkes bebcb97
conflicts with shared tests
henderkes a483c42
redis check if static or shared
henderkes 292df38
isInstalled for GoXcaddy
henderkes e34eb50
fix tests failing to deprecation
henderkes 55fd7ba
bring back static -lstdc++ for rhel 2.17
henderkes 408b3b4
try to test with zig?
henderkes f6c6011
err, we need to install zig of course
henderkes 27f57cc
fix zig runtime
henderkes 88f9172
bring back opcache jit fix
henderkes fd89e83
musl paths in zig toolchain are hogwash, of course
henderkes d275d6c
fix native chain
henderkes a6d68b9
fix ncurses
henderkes 8d47e56
sanity check after toolset init
henderkes 8b3a22c
better error message
henderkes d8ee308
allow explicitly setting toolchain (simplify testing without constant…
henderkes 719bde8
allow compilation with empty target
henderkes a056462
try removing -lstdc++ (this will likely make a few extensions fail to…
henderkes b16638d
place -lstdc++ in compiler_extra
henderkes b5aa7fc
simplify script a bit
henderkes 0695fb9
cs fixer
henderkes 5577cd0
add cache file option to autoconf executor by default (if cflags and …
henderkes abe2759
add cache file option to autoconf executor by default (if cflags and …
henderkes 6f68d7b
Revert "add cache file option to autoconf executor by default (if cfl…
henderkes a5a020e
Revert "add cache file option to autoconf executor by default (if cfl…
henderkes cc285ae
cs fix
henderkes 4b38da7
test frankenphp too
henderkes 76b36ce
fix macos test
henderkes 2ac5438
libheif and libde265 report dependency on -lc++ instead of -lstdc++
henderkes 39ffb8d
why does exec work but output=$(...) doesn't?
henderkes f6a292b
cleaner
henderkes 420fe49
patch correct pc
henderkes aff3373
remote -lutil?
henderkes cebd95b
suggestion
henderkes c735960
Revert "remote -lutil?"
henderkes 456d12f
fix error suppression
henderkes a5a87b9
update target declaration to be correct
henderkes 20c4056
test native-native in CI
henderkes 6355a97
don't pass --build-shared when not using zig toolchain
henderkes 4a2b28e
fix isStatic detection for native-native
henderkes f6a1065
fix libc detection too
henderkes 8b37c64
don't replace -lc++?
henderkes 3444e30
cs fix
henderkes e5c5b77
don't run extra logic in zig-cc script if there's no version string i…
henderkes ccdb6a0
test native-linux-gnu again?
henderkes e019b65
does this break tests again?
henderkes 3070376
dont use 32 bit objects
henderkes d65d82f
remove extra libraries for php configure/make, since they're the same…
henderkes 94c38df
remove superfluous build-frankenphp script
henderkes 013a19e
rename COMPILER_EXTRA to SPC_COMPILER_EXTRA
henderkes 5f8cd97
Move extra runtime object to zig toolchain
crazywhalecc d7f3005
Fix missing dash
crazywhalecc 59f9143
Remove redundant postfix in openssl
crazywhalecc c9d33bf
Chore
crazywhalecc 112f607
Add linux-only for extra runtime objects
crazywhalecc 2ac20cf
remove unnecessary LDFLAGS_PROGRAM env var
henderkes 93d6a45
*full* shared extension build linked against musl libc dynamically wo…
henderkes 26aca72
update php-cs fixer to get rid of PHP_CS_FIXER_IGNORE_ENV variable
henderkes 47cbdf5
oops, needs musl
henderkes e31e228
don't hardcode architecture
henderkes a191c13
strip all may strip things needed for relocation on musl
henderkes 05f3abe
cs fix
henderkes b0cfb4b
don't clog our build CI when cs fix, phpstan or phpunit fail
henderkes a097484
update isStatic check to ignore SPC_LIBC if using Gcc/Clang/Musl tool…
henderkes 4024f9d
Update SPCTarget.php
henderkes 9935eba
Update test-extensions.php
henderkes 939b9eb
fix debug flags
henderkes 3ff8c50
cs fix, enable action-tmate
henderkes b12cb33
move tmate session thingy
henderkes 67277cc
explicitly state libphp we built?
henderkes 01517f8
disable tmate
henderkes 10c8fe1
make it fail again (so we can later enable tmate)
henderkes 9bf65ff
figure out what libphp it pulls in and why
henderkes 5ab5908
comment it out again
henderkes 04cbba3
enable-pie for openssl
henderkes 385a46b
update notes for argon2
henderkes 9cd17fc
make sure that libargon2 is always linked in before libsodium
henderkes 7b5f4e9
cs fix
henderkes dd6c1d9
patch pkgconf prefix to BUILD_ROOT_PATH instead of /../..
henderkes 4f4e1ca
revert
henderkes df4d66a
disable jbig for imagemagick
henderkes 64776e3
don't do host shenanigans with libffi
henderkes b3c6659
always dump error when extension sanity test fails
henderkes b05002e
manual compilation doesn't respect CFLAGS, so pass them directly
henderkes ca8cd7f
Merge branch 'main' into zig
henderkes e675af9
use zts of course...
henderkes 33d974b
use stable sources for swoole and swow
henderkes 991e2de
stable
henderkes c752f4d
tidy too
henderkes 04f3f08
Merge branch 'main' into zig
henderkes fff2364
only comment out that line temporarily
henderkes 01887d6
add extra runtime objects for shared libraries built directly by php …
henderkes ada203c
str_starts_with
henderkes 683461d
actually path php makefile
henderkes 6f9a45b
shared extensions may also need to patch
henderkes 9b72f57
use www.example.com
henderkes b79b1f5
cs fix
henderkes bce363e
make sure we didn't break any other OS
henderkes 711d61d
testing frankenphp with php 8.1 makes no sense
henderkes 828f515
disable ubuntu latest (jit error until php-src fixes it)
henderkes ff30e0f
Use https instead of http for gnu docker
crazywhalecc 4fc081f
Correct chdir to original dir
crazywhalecc 86e3e51
Drop legacy phpmicro support
crazywhalecc d5cd42b
delete cs fixer wrapper
henderkes a0f474d
redundant
henderkes 3350888
Merge remote-tracking branch 'origin/zig' into zig
crazywhalecc f69f8d1
Move zig-toolchain-only things to zig toolchain class
crazywhalecc a8dcfce
chore
crazywhalecc b746e50
Make IANA happier than apple
crazywhalecc 206bc95
use correct musl lib
henderkes 1e42ef0
Merge remote-tracking branch 'origin/zig' into zig
henderkes 9ba9b87
makes more sense
henderkes 81b96c2
Merge remote-tracking branch 'origin/main' into zig
henderkes 1300919
cs fix
henderkes aa366d4
remove linux target os
henderkes 8f8a493
trigger deprecation again
henderkes 84e470d
Merge branch 'main' of https://github.com/crazywhalecc/static-php-cli…
henderkes b3f1103
well shit, zig cannot build libjxl
henderkes 8c8800f
work around it for -target without version...
henderkes 6c76187
remove old code
henderkes 407f6d4
remove zig specifics
henderkes 6da3f78
force disable AVX512 for zig
henderkes 41bb3e7
move -Wno-date-time to ZigToolchain instead of env.ini
henderkes 1d6b2bd
cs fix
henderkes c86360c
typo
henderkes eb898a8
add ulimit -n for zigtoolchain
henderkes 7b07137
typo
henderkes 5c9a3e2
array_reverse again
henderkes dd99f25
do not pull it symbols from libpq during conftests...
henderkes eca7a43
get rid of extra logic for shared and static libraries, rely on SPCCo…
henderkes 7177afd
phpstan fix
henderkes 155e22a
with_dependencies was removed
henderkes 8c5dc91
test gnu (test musl again later, jxl fails with avx shit again)
henderkes 8ff52e2
-lphp shared not static
henderkes 7eb5fb4
l:libstdc++.a
henderkes 00e78dd
fix imagick problem, for some reason it must be in the --start-group …
henderkes ea56e46
zig script
henderkes 27a4d5a
better description of function
henderkes 0acf238
suggested are required too
henderkes 029f2db
oh dear god what am I doing
henderkes 199b3b5
Merge branch 'main' of https://github.com/crazywhalecc/static-php-cli…
henderkes 51fcc6b
test musl again (succeeds locally :)
henderkes 37a453b
of course x)
henderkes b4392ad
always install musl libc (to be able to compile dynamic with zig)
henderkes a8be88d
fix swow
henderkes 821411c
only -lstdc++ on linux
henderkes a9fab86
rename getStaticAndSharedLibs
henderkes a0edca5
docs for function
henderkes af63723
revert DYLD_LIBRARY_PATH
henderkes ed3a78b
revert macos mistake
henderkes a3efe86
logging
henderkes 18a5215
cs fix
henderkes 5482f13
make sure we don't use musl ld
henderkes a355e4d
run macos tests again
henderkes da8c385
please...?
henderkes d627363
please please...?
henderkes 753c720
remove test, seems like removing musl from paths was successful
henderkes 3cbd52c
test with zig-cc instead
henderkes 70a9ffe
now test gnu again
henderkes 2cb1a95
change dependency tracking
henderkes 6e74dab
reduce libphp.a size by stripping .a archives inside it as well
henderkes c2b3b78
switch to libmimalloc.a because go linker is sometimes doing unpredic…
henderkes 630f861
move musl check so it doesn't keep prompting for install
henderkes fb62a0e
small adjustments
henderkes 9785521
try to make everything -flto=thin compatible (librdkafka fails for so…
henderkes 05053b5
cs fix
henderkes d0d51cc
trigger CI again after clearing cache
henderkes e1edaa2
"zig-cc" cannot create shared objects according to conftests...
henderkes 76094fd
hello?
henderkes bd3092a
wtf?
henderkes 5a4da8e
install zig before doctor
henderkes cf529ad
uh, oh, we forgot to do post init
henderkes 5beb083
no musl check?
henderkes 42b4272
idk
henderkes b6f673c
Use $AR instead of `ar`. Compatibility with -flto(=thin).
henderkes a8492f0
use zig's linker too (ends up getting used automatically in most case…
henderkes 5b4cbbb
set permissions
henderkes 944cca7
use $AR in second part of command too
henderkes fb2d676
zig doesn't support windows (php doesn't support mingw, zig can only …
henderkes 3087dc8
https://www.phoronix.com/news/GNU-Binutils-2.44 ld.gold is deprecated
henderkes 342192f
remove lto related stuff again, not worth using
henderkes feaff0a
fix macos
henderkes a968b19
remove zig stuff from tests for now, since we need to keep gcc default
henderkes e8bc892
Merge branch 'main' of https://github.com/crazywhalecc/static-php-cli…
henderkes 72abd63
cs fix
henderkes 81f359d
fix tests
henderkes 430364a
quicker tests
henderkes 83dae09
cs fix
henderkes df76ecb
Fix PHPUnit test, remove unneeded test (function is dynamic)
crazywhalecc 76d17eb
-static was too much
henderkes fda637b
suggestions
henderkes ecaa31f
no start group for macos
henderkes c58bc03
version 2.7.0
henderkes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.