How to provide some compiler flags?
I want to do some benchmarks with compiler optimizations such as -O2 -march=native -pipe.
Is it possible to customize these flags? If it's possible, will it apply to all static extensions or just the final php binary?
Also, can we use Intel Profile Guided Optimization? The generated Makefile for PHP source code has PGO targets but I think spc does (can) not use it in any way.
Thanks in advance.
Currently spc cannot customize compiler flags using command or ENV. If necessary, you can provide some practical suggestions.
Actually I don't have a good solution to implement it yet (distinguish between lib flags and PHP's compilation flags). Maybe reusing the -P to provide flags is a good solution, but we still need to modify the spc source code to reserve a custom shell parameter point.
The generated Makefile for PHP source code has PGO targets but I think spc does (can) not use it in any way.
If it's convenient, you can submit a PR to end the PGO issue.
Finished, docs: https://static-php.dev/en/guide/env-vars.html