-
Notifications
You must be signed in to change notification settings - Fork 368
[PHP.wasm] Upgrade emscripten version from 4.0.5 to 4.0.19 #2910
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
base: trunk
Are you sure you want to change the base?
Conversation
…ild without RELOCATABLE option needed
9d08def to
0c23c20
Compare
|
The remaining failure seems unrelated to this PR 👍 Let's rebuild all the wasm files to make sure all the tests pass and we're good! I love how much smaller the built binaries are becoming. |
|
@adamziel Me too! I am currently rebuilding PHP.wasm node Asyncify as the 5th step in the description list. This will unlock the Intl dynamic extension for Web PR. I will create a new pull request to try to correct the failed test as I think the current failure could be related to PHP not running |
|
@adamziel The |
45be38f to
0f20c02
Compare
|
@mho22 following up sounds good, but I'm suspicious about it not failing anymore. Are we adding something to the asyncify list in this PR? Why is it not failing anymore? |
|
@adamziel I will investigate. I didn't add anything to the ASYNCIFY list but I think there could be two reasons :
I suspect the second option. |
|
In order to keep consistency between every PHP version I will need to re-run the compilation of every PHPs... Since a new version of PHP 8.4 has been released and a minor change has been added in I hope we won’t need to upgrade Emscripten again for a long time after this pull request 😅 |
|
@adamziel That's it! It is now ready for review! |
Motivation for the change
We need this pull request in order for our PHP.wasm build to be built without
RELOCATABLEand avoid size increases when building withMAIN_MODULE. The pull request is in4.0.19release.Implementation details
base-imageDockerfile.setErrNoandmallocfromEXPORT_RUNTIME_METHODSsetErrNoby__errno_locationinphpwasm-emscripten-libraryPHPLoader["free"]with_freeinphpwasm-emscripten-librarywasmExports['free']toPHPLoader['free']inphp/DockerfilewasmExports['malloc']toPHPLoader['malloc']inphp/Dockerfilefd_closefromJSPI_IMPORTSandJSPI_EXPORTSdue toSuspendError: trying to suspend JS framesdefault.profrawfile in.gitignore__funcs_on_exitfunction inJSPI_EXPORTSto solve issues from PHP7.4 and PHP7.3__funcs_on_exitfunction inEXPORTED_FUNCTIONSto solve issues from PHP7.4 and PHP7.3zend_list_free_wrapperin PHP7.4 and PHP7.3HEAPU32andHEAPU8inEXPORT_RUNTIME_METHODSphp-crash.spec.tsdue to no moreunreachableerror thrownphp-crash.spec.tsfile to run test on each supported php version_mallocfunction inEXPORTED_FUNCTIONSTesting Instructions
CI