mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 16:25:39 +08:00
exit handlers patch instead of continuous
This commit is contained in:
15
src/globals/patch/spc_pgo_flush_php_main.patch
Normal file
15
src/globals/patch/spc_pgo_flush_php_main.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
--- a/main/main.c
|
||||
+++ b/main/main.c
|
||||
@@ -2563,6 +2563,12 @@
|
||||
#endif
|
||||
|
||||
zend_observer_shutdown();
|
||||
+
|
||||
+ /* spc-pgo: explicit profile flush so embed/frankenphp callers that exit
|
||||
+ * via SYS_exit_group (skipping libc atexit) still get .profraw written.
|
||||
+ * Weak symbol → no-op in non-PGO builds. */
|
||||
+ { extern int __llvm_profile_write_file(void) __attribute__((weak));
|
||||
+ if (__llvm_profile_write_file) __llvm_profile_write_file(); }
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
Reference in New Issue
Block a user