-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Add an option to build all libraries with debug symbols #377
Comments
Another option, probably better, would be to enable the debug mode in every library (if supported), if the |
This may related to #331 . Actually I have no idea for this because there are too many libs. If we just add options for PHP, it would be easy: such as I prefer to inject customization points into the compilation command and make a series of modifications with the |
haha, I literally came here to ask the exact same question! Personally, I'd prefer a way to generically set CFLAGS and CXXFLAGS. I haven't confirmed this is the cause, but it appears that the built libraries lack any optimizations |
I was originally going to add
But this will have some problems:
I still don't know what is best for spc. There may not be a perfect solution: because we cannot allow all parameters to be customized, it will greatly increase the complexity of the builder. 😢 Although I now have the time to quickly implement this customization, I am not good at designing good project structure. |
After a month of trying, I finally decided to customize only some of the compile flags as needed. See #403 This might not be a great solution, but I also don't want to get stuck in infinite customization hell. |
Finished, docs: https://static-php.dev/en/guide/env-vars.html |
This would be super useful to have the ability to build everything with debug symbols. This would make debugging issues such as php/php-src#13648 easier.
To implement this, we could add a new
cflags
option, that will automatically set theCFLAGS
env var for all built libs.Then, something like
spc build --cflags='-g -O0' --no-strip
should allow to get good stack traces of everything.Would you accept such a patch?
The text was updated successfully, but these errors were encountered: